Pac-Man: Ghosted!

Pac-Man: Ghosted! (originally titled Pac-Man World 4) is a 3D action-adventure platformer developed by Bandai Namco and published by Nintendo. for the Nintendo Switch and PC. The player controls Pac-Man in a 3D platforming environment, though six worlds. It is a spiritual successor to the PAC-MAN World series, as it contains gameplay elements from all 3 games as well as new elements. The plot and gameplay ideas for the game are based on the cancelled PlayStation game, Pac-Man Ghost Zone.

Plot
Tired of Pac-Man eating them and ruining their plans, Inky, Blinky, Pinky, and Clyde summon the Ghost Lord, an evil ghost emperor who is willing to help them take down Pac-Man once and for all. Meanwhile in Pac-Village, Pac-Man, Ms. Pac-Man, Jr. Pac-Man, Professor Pac, and Pac-Baby are having a picnic, and Pac-Man leaves to get some snow cones. While he's gone, a portal opens in the sky and sucks Ms. Pac-Man, Jr. Pac-Man, and Pac-Baby into the Ghost Realm, with Professor Pac escaping. When Pac-Man returns, Professor Pac informs him of the trouble and Pac-Man goes through the portal to the Ghost Realm in order to stop the Ghost Lord and save Ms. Pac-Man, Jr. Pac-Man, and Pac-Baby.