I know 2 SWE in the company who actually discussed this with their managers and got okay in writing for their consulting businesses.
EDIT: Really curious if SWE actually read their contracts or they just assume that they are not allowed. I don't remember my contracts from earlier jobs. It would be interesting if we can have a site like levels.fyi for contracts.