This is by design and working as intended. Sprite renderers use dynamic batching by default, which is why you are seeing different world matrices depending if the sprites are batched. See https://docs.unity3d.com/2021.3/Documentation/Manual/dynamic-batching.html for batching limitations.
If you require to use world position in your shaders, consider using SRP Batcher instead where per object data is preserved. See https://docs.unity3d.com/Manual/SRPBatcher.html for more information.