Hi Callum,
that's funny. I disabled Metal Compute ... it works as expected. I re-enabled Metal ... it continues to work as expected. May be, that detour forced a kind of cleanup behind the curtain. By the way in case that it could be helpful for your analysis: I am using a Mac Mini 2018 with a T2-Chip. My be that chip gets in the way when one addresses metal in the "wrong" way.
Thanks for your quick and successful help