This error can still occur in UE 5.1.1.
The only way for me to fix this was to manually change the bEnableActorSnap=True to False inside EditorPerProjectUserSettings.ini under the project’s Save directory.
I tried using the buttons in the editor’s viewport to no avail, none of the settings fixed the problem or changed this config value. I do not know how this happened as i’ve never used actor snapping in my project (maybe there is a bugged shortcut I accidentally pressed?), hopefully the solution to the problem provides enough information for you to try to fix this issue.