You can use coordinate variables to set the position.
Have a parallel event on the map that keeps track of the coordinates of the boulder, and when you enter the room again, use an autostart or something to put the boulder where it was last. Remember you'd probably have to do some tricks with the teleportation to make it look smooth, otherwise the boulder would appear to jump as soon as you enter the map.