Sounds like a race condition to me. Ideally this should not happen and especially when network latencies are considered but I wonder if there is a bug lurking that's manifesting on local when you delete and create a collection fast like that.
How often does this occur? Every time or rarely?