This is a very common result of data corruption in makecode. There is a lot of things that cause it. The most common reason has to do with assets getting corrupted from duplicating them without naming them. It is also somtimes caused by faulty extensions. (I don’t immediately see any in your project screenshot)
You can get an old version of a project back by clicking the settings gear in the top right on the orange bar. Select version history and restore to a non-corrupted version.
This glitch has been around for as long as I’ve used makecode. (4+ years) So I don’t think its simple for makecode to fix, but I remain hopeful!
Here is a post I made about avoiding future duplication-corruption: