Could be related to the issues I'm having detecting cancellation of subtasks in AsyncStream and Cancellation. Part of the issue here may be that you aren't waiting for cancellation to complete, and that the behavior of Task in that case isn't documented. isCancelled is synchronous, so I'd hope the updating of the state would be too, but there may be a race here.
Your expectation is correct; I reproduced the issue and this definitely seems quite off... We use an atomic change to mark the flag as cancelled so I'm a bit confused how this can happen.
Would you mind filing a bug on bugs.swift.org and I'll look into it in the meantime already?