I was wondering, why was this answer deleted by moderation?
Razor code formatting issue with Visual Studio 2022
It did help me understand the issue I was having. Though not perfect, should it have been deleted?
Update:
Following this discussion I edited the answer to make it more understandable and added relevant information, trying to not remove OP personal touch.
Picture for those who don't have the needed privileges: