If you have pledged shares and have received additional margins to trading in Equity F&O, you are not allowed to sell the pledged shares during this period.
The right way to sell the pledged shares is:
Close all the existing open position/s where the pledged margins are utilized
Request for the unpledge of holdings (Refer to this article)
Generally, unpledge of shares takes one working day. Once the unpledge is processed you can sell the shares hassle-free.