Hello,
From what I know, when you installed over Fences 5, your layout should still be intact. If you do the uninstall Fences 4, and, did not tick the remove setting option while uninstalling, that should also have your layout save for Fences 5 to use when you install it. But, just to be sure you could use this guide to backup your layout snapshots: https://forums.stardock.com/486084/fences-support-faq#backupsnapshots
Thanks
Basj,
Stardock Community Assistant.