How to get around copy-pasting passwords?

Depending on your point of view, the clipboard is not safe at all. Any running application, malicious or not, can read and write to your Windows clipboard. This means if you copied a password and do nothing else it will stay in your clipboard until the user is logged out. This can be made even worse by clipboard managers, which can store your clips past reboots.

I am not sure about KeePassXC, but KeePass itself has an option to clear the clipboard contents after a certain amount of time. I use KeePass for work and we are required to leave that option enabled, so the contents of the clipboard are removed after 5 seconds.