Inout sending value passing into inout sending closure

A recent thread with similar material, though I think it only addresses this as "probably a bug": Sending, inout sending, Mutex

Have you tried

try mutex.withLock(execute)