I just paint a coat of latex paint over my foam scenic landforms. But, I still usually mask off the track and cork roadbed before painting them, to control overspray onto the scenery.
That said, I once spilled a bottle of styrene cement on my 2” foam. Let’s just say there is still a cavern underneath the town of Aberdeen on my layout. 😆
DFF