It seems you have to override the environment locale and switch between one that defaults to am/pm (like GB) and one that is 24hr (like US), e.g.
@State var is12h = false
let date = Date()
...
Text(date, format: .dateTime.hour(.twoDigits(amPM: .abbreviated)).minute(.twoDigits))
.environment(\.locale, Locale(identifier: is12h ? "en_GB" : "en_US"))
...
11:01PM
23:01
Topic:
App & System Services
SubTopic:
General
Tags: