I had this same file error.
I used two different posts to diagnose and fix my problem
https://www.reddit.com/r/aoe4/comments/qir8lw/stuck_in_compatibility_mode/
and
First, I went into the start/windows key and searched for regedit, and once open, followed the Reddit post’s instructions (first link) on where to find the Steam.exe run path.
In there, I did not have a steam compatibility issue, only a listing for Steam running as administrator. I DID have a code for Path of Exile, as mentioned by the other post in the AOE4 forums (second link).
That POE line of code was for, in my case, a high dpi detection. I no longer have POE installed, and havent played in years, so deleted it with no worries.
That said, I also went into the properties settings in the steam program and enabled compatibility mode. (right click steam icon>properties>compatibility)
When I pulled up the regedit layers again (close the layers folder, then reopen it), Steam now had a line of code for running in compatibility mode. I deleted that line of text in the registry editor. Reopening the steam properties, I checked to make sure the compatibility check box was once more unchecked (it was unchecked).
Booting up steam and AOE4, I no longer had the error that Penteract posted a picture of.
Because I did both things (deleting the POE dpi detection code as well as adding and manually removing the steam compatibility code) I cannot say for 100% that AOE4 was detecting the POE line of code and mistaking it for itself running in the wrong mode, or that it was AOE detecting steam running wrong. That said, my problem is fixed and I no longer have the compatibility error pop up.
Hope this helps someone