Thanks for the prompt response. I tried your suggestions, but unfortunately, they did not work.
I have disabled the distance between fences.
After placing the fences in a way I wanted them, I created a snapshot. After I noticed the menu bar is again on the bottom, I tried to restore the snapshot, but that did not work. The menu bar still stayed at the bottom of the fences instead of on top. So, perhaps the restoring part of the fences does not work properly?
I also noticed that not only after restarting but also when the laptop comes out of hibernation the menu bar drops to the bottom.
Do you have any other suggestions?
Thanks for the effort!