No official cheat code enables free flight. The game's design restricts flight to specific power-ups and characters.
Speedrunners use "Infinite Flight" glitches (e.g., Yoshi dart + spin cancel), but they require frame-perfect inputs and often crash the game.
Play as intended: the 242-star journey is the reward. Red Star is the true "fly anywhere" unlock.