Sprite scale problem with orthographic camera

I tried to render tiles and other stuff from script and discovered the next problem that I cannot fix: relative position & size of the sprites on the screen are correct only with precise value of Camera.size.

A few examples:

Camera.size = 5. Almost correct. No gaps between tiles.

Camera.size = 7. Incorrect. Tiles are on the same positions but they are smaller, so there are big gaps between tiles.

My low-level code for rendering:

sprite = Sprite.Create(texture, rectInTexture, new Vector2(.5f, .5f));
...
sprite.transform.position = Camera.main.ScreenToWorldPoint(new Vector3(p.x, p.y, 0f);
...
sprite.transform.localScale = new Vector3(scale.x, scale.y, 1f);

So I want to figure out how to make so that different values of orthographic size would not change the relative position and scale of sprites.

Thanks in advance.

Is there a reason for using ScreenToWorldPoint? I’m not sure I get what you are actually trying to accomplish…