In those some do/some don't examples, I'd wonder if caches are a factor.
Are you checking last visit? Do your set values expire?
If this behavior is unexpected, I recommend you file a report at bugreport.apple.com with more specifics, such as a HAR archive from Web Inspector. Without actual diagnostics and logging, it would be difficult to diagnose what is happening inside Safari.