To be honest, I also want to know the answer since I get the same problem in 1.14 when I'm making mod spotlights and it's really strange. It's happened twice now (one time in Forge when I wanted to use spectator mode to cover nether ore gen I fell through the world, the other I just wanted to show off a jetpack that gave creative mode flight in survival and I can't do any creative mode flight in creative at all and again or I just fall through the world in spectator mode. Of that world though. Not every world even if I create a new one I think it doesn't happen, but I switch out mods a lot and the two instances had completely different mods so it's not common just a rare case, since I test and cover different ones all the time [the ore one I was covering and ore related mod "Elementary Ores". The other I was covering was a Plastic Craft inspired mod (the jetpack) but both instances didn't have related 'types of' mods at all]). In both Forge and Fabric instances so it clearly doesn't matter the environment's differences of those two modloaders and it's a bug neither has fixed between 1.12.2 and 1.14.4 Forge but there must be something they have in common for it to happen as I've not come across it in Vanilla myself yet.
Fabric doesn't use MCCoder Pack or but might some odd similar things, so I don't know what it is but some gamemode or world saves issues with modded instances.