I have now tried playing HLS with SDR and HLG and HLG-only.
The new Apple TV 4K 2. Gen with a HDMI 2.1 compatible cable successfully played the HLG variants for both playlists.
The old Apple TV 4K 1. Gen and the Apple TV 4K 2. Gen with an old HDMI cable played the SDR variant of the mixed playlist and failed to play the HLG-only playlist.
This is the desired behaviour.
The downside of AVPlayer.availableHDRModes reporting the support incorrectly is that we cannot show our users if they will be able to play content in HDR.