Deleted documents reappearing

I’ve been doing some more research and it doesn’t seem that my current sync function is incorrect. I’m using the same method as suggested by @priya.rajagopal