Confused about behaviour of switchToLatest in Combine

You could try using the switchToLatest implementation from OpenCombine or CombineX. Either will require a little tweaking to supply lock implementations.