Swift Language Mode and BGAppRefreshTaskRequest

I have an iOS app, which compiles without errors or warnings (Xcode Version 16.2 (16C5032a)).

This app submits a BGAppRefreshTaskRequest.

The problem:
It works fine in Language Mode = 5,
but in Language Mode = 6 this request is never triggered.

I thought that the language modes only differed in the amount of warnings or errors.

Would this be a bug in Swift or in BGAppRefresh?

Also: is there a way to test for the language mode, like:

#if language_mode == 6
	#error "Must use language mode 5"
#endif