How to save and load terrains map with random tile?

Godot Version

4.2

Question

how to save and load terrains map with random tile?
i have one tile that have with 5 random sprite like png bellow ( 1 )

and this what i save ( 2 )

and this what i get when load it ( 3 )

see the tile with number on it change when i load it,

  • how to make sure i can save those tile with correct tile?
  • how can i load the correct id tile, and put at correct position?

i try with set_tile, but it make my autolite/ terrain wont work with it.
—this my code( 4 )