Please explain in more detail what you see after locking once vs twice.
Also note existing bug reports:
"dock is visible when screen is locked" -> bug 1769383
"once screen is unlocked the dock disappears even after pressing activities" -> bug 1796265, bug 1801494
Finally, please try disabling all gnome-shell extensions and see if that fixes things.
Please explain in more detail what you see after locking once vs twice.
Also note existing bug reports:
"dock is visible when screen is locked" -> bug 1769383
"once screen is unlocked the dock disappears even after pressing activities" -> bug 1796265, bug 1801494
Finally, please try disabling all gnome-shell extensions and see if that fixes things.