As of October 9, 2022, you can hide your online status in whatsapp of android accounts. You'll need version 2.22.20.79 .
For iOS users, this feature has not been released yet.
For iOS users, this feature has not been released yet.