Possibly you could achieve what you’re looking for with CSS. I’m not a CSS expert, but was just looking at a similar issue. Something like this added to your theme might do the trick:
.anon .custom-search-banner p:after {
content: "Please register to search in all Categories.";
display: block;
}
Anon users will see:
Logged in users will see:
If you use this, be sure to test on mobile devices and ideally a few different desktop browsers.

