Thank you @emovla, removing the @Environment(.dismiss) (which was unnecessary anyway in my case) fixed it for me.
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tags: