FIDE is an agency that exists to promote and develop chess.
Magnus Carlsen is the biggest draw in the chess world by far.
A minor dress code violation should have been dealt with a fine as the rules very much allow for the benefit of the game.
Also, I don’t think there’s a single player who would complain about that (well, other than Kramnik, but Kramnik complains that spectators breathe too loud and that’s cheating).
And then FIDE should have stepped back and thought about the recent growth in the popularity of chess, since the pandemic and thanks to the work of the likes of Magnus and Gothamchess and should have reconsidered the strict dress code rules in the first place.