If I remember correctly, space characters will be trimmed at the begging and the end of a string. Could this be the cause?
If you would like to replace for four spaces, use regex search and put ░{4} (where ░ represents a space character) there may help.
I have a very similar macro that I made, using RegEx search:
Don't use a named clipboard for the find string. Use the %SystemClipboard% token in the find field of the dialog, so you don't have to paste it manually.
When you delete the past clipboard 0, clipboard 1 will become clipboard 0, so the effect is the same with setting systemclipboard with clipboard 1.
The difference is that with the latter, the original clipboard 0 (what you copied to the named clipboard) moved to clipboard 1, whereas with the former, the original clipboard 0 is simply deleted. I thought the former better suits your case, because you do not seem to need the content of the named clipboard to show up in the clipboard history at all. But this is a minor issue and does not affect your need.