For now, until I've beaten Goomboss with Toad, if I find another error I'll let you know.
In fact, I'm already in Sarasaland, and King Totomesu (the first boss in Super Mario Land) also has the same problem. The bosses you have to defeat will get you stuck if you choose the infinite health option. I don't know if there are more bosses like this.
I skipped the Wario part because I started a game without infinite health and then started again with infinite health in the Warp Zone option, and now I'm stuck again.