For me the problem was the way I made the custom tabBar. It wasn't working well so I deleted it and remade it in a different way and simpler way. The problem is gone. I would suggest before you look for a workaround try to fix your navigationViews.
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tags: