They still can be considered an insider and would likely end up in trouble if it was discovered the CEO liquidated a large portion of thier holdings prior to negative news, like a company was filing for bankruptcy or closing shop.
But in less extreme circumstances the CEO can buy or sell when they choose.