I’m not a lawyer but my layman’s opinion is that the state should retain ownership over the photo. To give an example, where I live a company began scraping mugshot photos and then compiling them into a newspaper that they distributed and sold for profit. It became really popular but it also drew a lot of negative attention since this company was earning money by spreading photos and arrest records of people that hadn’t even been convicted of a crime. The solution here was to just stop posting mugshots online, which was effective, but didn’t address ownership of the photos at all.
This isn’t exactly a 1:1 comparison since Trump was the subject of the photo and also the one selling merch, but I think there’s a valid argument against allowing people to privately sell products based off work/production funded by the public.