Doc's probably right but it may be for verification a "safety" item was checked prior to shipment or verify tampering later on. I've seen safety yellow paint applied to many things in my various careers and experience. It is usually for verification something with a perceived liability was confirmed.
When I was young I assembled new foreign made motorcycles in the dealership shop after hours. A lot of items that were already assembled came with a dab of yellow paint on them. Like rear swingarm pivot bolt nuts, steering head nuts, engine mounting bolt nuts, etc. We finished assembly of items like handlebars, control levers, mirrors, seats, etc. Things that didn't fit well into the crates made to save space.
You can probably set your cross bolt safety in the OFF position (pertruding from the left side), screw that hex head screw all the way down, and it will lock out your safety from being accidently set. Some Cowboy Action Shooters do this so that their safeties don't automatically engage when they stage their rifle flat on a table top.
It's likely a thread locker rather paint, I've seen tons of the yellow stuff and even more orange on bolts from the OEM's, they likely did put an extra dab on there to see if it had been tampered with?, if you didn't turn the screw it should have plenty on the threads to keep it in place.
It's not a thread locker!
It is an anti tamper revealer.
In order to "adjust" the screw it has to be removed and it is then instantly visible to Marlin service crew that the safety has been tampered with thus voiding warranty.