Can FileVault protect a macOS partition from a Ubuntu partition?
The are four types of Apple partitions that are commonly used:


Apple_HFS (MacOS Extended Journaled)
Apple_Boot (MacOS Extended Journaled used for Recovery)
Core Storage
APFS


These partition either can not be mount by Ubuntu are can be mounted as Read Only. So there is no danger of Ubuntu overwriting a macOS volume.


  Note: Most Linux (including Ubuntu) can write to non-encrypted Apple_HFS partitions if journaling is turned off. A macOS installation will always have journalling enabled by default.