this seems like a bug. it appears quite similar in structure to these existing reports (though uses a struct with an unavailable Sendable conformance rather than a class):
- A non-sendable class can bypass Swift6's concurrency check and cause data race?
- Data race safety regression with non-sendable class in Swift 6 compiler · Issue #76003 · swiftlang/swift · GitHub
out of curiosity, does TSAN identify the race at runtime?