I’ve found a workaround related to QuickAdd macros, and execution, which seemingly seems to do what you want it to do. It does however require a little bit of setup.
Create a file, e.g. newCopy.js
, somewhere within your vault, with the following contents:
async function newCopy(params) {
const selection = await app.workspace.activeEditor.getSelection()
if ( selection)
navigator.clipboard.writeText(selection)
}
module.exports = newCopy
Go to Settings > QuickAdd, and change the line somewhere near the middle to match this, before you then hit the Add Choice button:
You’ll now get a new line (with your new choice) at the end of the list above the line with the button. First of all hit the lightning symbol on right side, and then hit the cog wheel right next to it. You’ll now get this dialog window:

It’ll show something unrelated, so hit the + button, and it’ll change to “newCopy”, and you can then hit the cog wheel to the left of the + button. Which opens the following dialog window:

Click in the User script box, and you’ll get a drop down where you should be able to locate the newCopy.js
script from above. Note that the folder it’s placed in is irrelevant, as long as it is somewhere within your vault. (You can also start typing “newCopy” to find this script). When found/selected, hit the Add button to the right of this script, and close the dialog window, and the previous dialog window.
Now go to Settings > Hotkeys and add “QuickAdd” to the filter dialog, and you should see your new command in there. On the righthand side it should say: blank +, and you can hit the + to assign your hotkey to it.
After doing all of these setup, you should now have a copy command which only replaces the clipboard if you’ve made a selection in the current editor. I’m not sure whether this will affect copying on non-editor windows, or how it’ll affect those.
If that proves to be a problem, change the hotkey to something like Shift Ctrl C to be your new improved copy command, and allow the default copy command to do its thing in those cases.