Swift language mode 6 has more strict isolation runtime checks and such incorrect threading is now going to cause preemptive crashes rather than just silently running on the wrong thread.
You can see the assertion failing here: dispatch_assert_queue, called from: checkExpectedExecutor
In swift 5 mode this is allowed not to crash and proceed with the unsafe execution.
I’ll have a look at the exact case to make sure the error/crash is doing the right expected thing though.
The way you handle it via making the witness nonisolated
is the right way to work around it until the SDK fixes its annotation issue