Okay, so what worked for me was to include the toolbar with buttons in the screens which don't require buttons and then to hide them with an opacity modifier set to 0.0, like so:
Button(action: {}) {
Label("Share", systemImage: "square.and.arrow.up")
}
.opacity(0.0)
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tags: