Don’t overwrite system files managed by pacman and it won’t break your setup.
Put your script in the corresponding place in /etc where it’ll be handled properly, or better yet, do it correctly and set it up directly in your xorg.conf config. Or just use localectl set-keymap dvorak which will do the same thing but also handle non-X11 use cases such as the virtual consoles and Wayland.