Not legal advice but in many common jurisdictions that would not necessary be a offence since they aren’t acting on inside information but rather executing planned trades.
Though it would likely raise eyebrows and one would need to be mindful of related concerns like closed periods in the securities, which are far easier to monitor.