The padlock (lock) icon shown in the Safari address bar cannot be moved or remove. But if it's getting in the way, you can try one of the following approaches.
Instead of clicking using Mouse/Trackpad, you can use the keyboard shortcut Command + L to move focus to the address bar. Doing so also selects the current website address, so you can immediately start typing to enter new website address or search query.
You may consider enabling Show full website address setting under Advanced tab of Safari preferences. This would show the full address of the current webpage and may also move the padlock towards left in the Smart Search Field/Safari Address Bar thereby reducing the possibility of accidental click.
P.S.: The lock icon is shown in the address bar (officially named the Smart Search Field) for a good reason. You should be cautious when the padlock icon is missing. To learn more, refer to this official document from Safari guide from Apple: