In my case, the problem was I didn't deactivated instances and go to another room and come back, then invoke instance_deactivate_layer() doesn't work. Anyways this is turned out to be the bug of current stable release. The issue is fixed in latest beta release.Deactivated instances don't get saved. Reactivate them just before changing rooms.