The messaging applications themselves should have a status and/or visibility mode to prevent others from seeing you are online, you shouldn't need to do anything on the Mac itself.
I use several and most can't be seen. However, I live in Ecuador where almost everyone, including businesses, use WhatsApp. I am able to go incognito on my phone but not on the desktop version.
That is a limitation of WhatsApp for desktop then. Even if you were to "hide" your Mac, WhatsApp would still show you as online unless they add incognito mode.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.