You can resolve this by prefacing Environment with SwiftUI.
So, where you have
@Environment(\.scenePhase)
you will now have
@SwiftUI.Environment(\.scenePhase)
Worked for me at least
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tags: