We default to showing 404 errors in these instances for privacy reasons — some communities may not want users to know that there’s a valid topic there that they just can’t access.
While I understand that it’s not ideal for your use case, as @Firepup650 noted, your best bet is to enable detailed 404 and then update the Site Texts for the page_forbidden.title string. However please note that the detailed 404 setting only applies to private topics and not to other private areas like category pages, PMs, etc.
OK but perhaps this is a feature we could have - a category that is restricted to certain groups, and then a couple of settings:
Totally Private - the category is hidden from view, and returns a 404 error if someone tries to view it
Private unless you have a link - category is hidden from view, but if someone clicks a link to the category it says “Oops, this category is hidden, here is how you can get access”
Locked - the category is visible in the main list, and when clicked it says “This category is locked, here is how you can get access”
I think especially where a hidden category is a perk of a membership, this could be a good way to publicise that people are missing out, and so to encourage users to sign up!