I personally quite like this solution as it does not intefere with casual play
Pausing invalidating a run will still interfere pretty badly with casual play IMO. Going for colored name, which while I wouldn't call it "casual", is at a level where pausing to get an advantage is basically completely negligible and forcing someone to restart because they had to pause at some point in their 7.5 minute TTOTS run is just a bummer. Especially since I think pausing at the competitive level is not very common, only really finding use in a few levels.
I don't think there is a clear objective answer to this problem which solves the problem for everyone with no downsides. Invalidating runs due to opening the pause menu, at any level, seems overkill to me and will negatively affect casual play.
I agree that the use of pausing to gain an advantage is something frowned upon and should be avoided. I think a good proposal which has been brought up before: Modify the .rrec file format to store when the player pauses and for how long. I don't know many details about the rrec system but from the small amount that I've looked at the code I believe this should be possible. This doesn't need to be shown when playing back the rrec (at least not by default), but should be knowable by moderators to see when a player pauses. When WR runs get submitted to the leaderboard with pauses in them (which you can know since it's stored in the rrec), the moderators can look it over manually to decide if the pauses gave the runner an unfair advantage and decide to not allow the run through.
Edit
What are your thoughts on pausing specifically during WR runs? A proposed solution was to change the game so that a run that included a pause will not submit to the leaderboards.
My reading comprehension might be next to none LOL, Kalle are you suggesting that only pauses during WR runs would case a run to be invalid, and not for all casual runs? In that case, I see how you mean it won't affect casual play and I can agree. I still think we should find a way to store pauses in rrecs (which again I don't think is too hard with how rrecs store data in small chunks). That way, WRs that get sent with a rrec file containing pauses can be manually reviewed by the moderators with some sort of guideline on which pauses constitute invalidation, and or course the mods have the final say for any weird edge cases