The documentation states the following confusing message
If you are using scenes (see Scenes), UIKit will not call this method. Use sceneWillEnterForeground(