The lodestone is buggy and will teleport you to a random location when you use a compass on it. It doesn't happen 100% of the time, but it seems that when holding multiple compasses it will do it close to 100% of the time. Even when holding a single compass it will do this. Sometimes it will display an error message "no free block in front of lodestone".
Duplicate of MC-192074