This isn't an answer, but the comment field won't allow code blocks or image attachments.
My initial assumption that .leading was being treated as .left doesn't appear to be correct. If you position a circle at the anchor point using the following changes to ConentView it completely off of the blue rectangle for right-to-left layout.
struct ContentView: View {
var body: some View {
HStack(spacing: 0) {
Color.green
Color.blue
.anchorPreference(key: AnchorPreferenceKey.self, value: .leading, transform: { $0 })
}
.overlayPreferenceValue(AnchorPreferenceKey.self) { anchor in
GeometryReader { proxy in
let leading: CGPoint = proxy[anchor!]
Circle()
.fill(Color.red)
.frame(width: 16, height: 16)
.position(leading)
}
}
}
}