How to paint foliage only on specific (visible) meshes?

Not really. As ClockworkOcean said, the collisions are the problem here. It looks like Twinmotion automatically disables collisions for hidden items, but this doesn’t seem to be the case for Unreal.