Companies can cancel your vested equity for any reason. Read your employment contract carefully. For example, most RSU grants have a 7 year expiration. Even for shares that are vested, regardless of whether you leave the company or not, if 7 years have elapsed since they were granted, they are now worthless.
Right. In the case of OpenAI, their equity grant contracts likely have a non-disparagement clause that allows them to cancel vested shares. Whether or not you think that is a "valid reason" is largely independent of the legal framework governing RSU release.