Thank you!!
And sorry, it seems I didn't specify the position properly...
This map's center is (0,0,0) and its dimensions are (30,25).
(The map image size is 3000 pixels x 2500 pixels)
So, I started the loop from (-14.5, -11.5) and looped it (30,25) times, but the error disappeared by reducing the loop by one.
The location where items can be placed has become one square smaller on each side, but it is still working properly.
However, I don't understand why the error occurred, or why it stopped occurring...

