in the swift 6 language mode there appears to be a diagnostic warning about the risk when calling takeP() (godbolt) – are you seeing that with your configuration?
<source>:19:9: warning: sending 's' risks causing data races [#SendingRisksDataRace]
17 | @MainActor func main() async throws {
18 | let s = S()
19 | await takeP(s)
| | `- note: isolated conformance to protocol 'P' can be introduced here
| |- warning: sending 's' risks causing data races [#SendingRisksDataRace]
| `- note: sending main actor-isolated 's' to @concurrent global function 'takeP' risks causing data races between @concurrent and main actor-isolated uses
20 | }
21 |
[#SendingRisksDataRace]: <https://docs.swift.org/compiler/documentation/diagnostics/sending-risks-data-race>