Each competition will have its own rules. There is no answer that will apply
to all competitions. Most do not allow you to enter if the screenplay has been
optioned or sold.
In addition to what Rik said, your contract should tell what you can't do and/or if the producer is entitled to all revenue. If it isn't spelled out, you would have to check with an attorney.