My thoughts as well
https://twitter.com/ColMoeDavis/status/2030412712535060715
Should have removed the hat, but...he is the Commander in Chief.
Key details regarding the President's salute:
Voluntary Courtesy: While civilians in civilian attire are not required to salute, modern Presidents have established a custom of saluting the armed forces.
Common Occasions: The Commander in Chief typically salutes when arriving or departing on military aircraft/helicopters, during national anthem performances, or at formal military ceremonies.
Precedent: While some argue it is not traditional for a civilian to salute, Presidents since Reagan have frequently rendered the salute to show respect for the military.
Uniform Note: If the President is a veteran (as some have been) and in civilian clothes, they are authorized to render a hand salute, though it remains a choice