You can do this with trainerbattle 0x9 I believe. The only problem is that if you do decide to use this method, the Fire Red tutorial jargon will commence (the dialog with Professor Oak interrupting).
Another great way I've seen this "you're supposed to loose" thing occur is in Pokemon Ruby Destiny: Reign of Legends, which is surprising since its objectively a ****ty hack :). Somewhere in the middle of the game, the player is faced against a lv. 100 Shadow Lugia whom kicks your ass. The player is then sent back to a PokeCenter. Upon returning the the location of the Shadow Lugia event, nothing happens and everything and everyone is gone. The player is then able to progress with the story.
The way this works is that a flag is set just before the battle starts. This way, whether the player wins or loses, the game knows that the player has at least attempted to fight Shadow Lugia. You can use type 03 level scripts from there to hide things, show new things, and progress the game further.