Thunar doesn't respect the open with default application when it comes to .desktop files
If you right click on a .desktop file and select properties, and set it to open in a text editor it won't open in the text editor, instead it will try and launch the application, but it works with other files, for example setting a flac file to open in mpv or audacity works fine, and it works in Thunar 4.16, so if I set Thunar 4.16 to open .desktop files in a text editor it will open them in a text editor when clicked on, I notice this isn't just related to Thunar though, other file managers like Nemo and Caja have the same behavior, but then other file managers like spacefm will respect the default application and open it in the text editor when clicked on.