MPMusicPlayer continues in background, incorrectly?

I have written a small app that runs on iOS 15.   I am trying to get some user-selected song to play in the background.   The code below does that fine.

However, the documentation says that the music should stop when the app is placed in the background.   But I am not seeing this; the music continues to play.   (The content of the system music player is not effected by this app.) 

Am I missing something here?

    func setPickedSong(_ song:MPMediaItem) {
        let player = MPMusicPlayerController.applicationQueuePlayer
        player.setQueue(with: MPMediaItemCollection(items: [song]))
        player.repeatMode = .all
        player.prepareToPlay { error in
            if (error != nil) {
                print("ERROR: \(error!)")
                return
            }
            player.play()
        }