Hello,
This flag is set as long as last packet is not sent (or ACKed on a TCP transmission). Stack (in your case, lwIP) should handle the logic to change TxPointers once these message are sent.
In other words, you should not clear this flag manually until lwIP defines if previous packet was sent correctly
What application are you using? Did you try to use a sniffer to check if data is sent/receive correctly?
Regards,
Isaac