It's expected. body needs to call the myVar getter if you want body to be called when the myVar setter is used. And you need this to happen so that the .sheet computes a new version of the closure. You can fix it by putting the bool and the myVar in the same State, e.g.
struct Content {
var myVar: Int? = nil
var presentSheet: Bool = false
}
@State var content = Content()
.sheet(isPresented: $content.presentSheet)
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tags: