The painting depicts an event which happened in real life, but it didn't aim to be an accurate record of the Temeraire's last voyage. Turner wanted viewers of his painting to think about how the Temeraire had served her country in the past, and how Britain now seemed to have turned its back on her.
When he exhibited the picture in 1839, he included these lines in the display:
The flag which braved the battle and the breeze,
No Longer owns her.
Indeed, the Temeraire doesn't fly the union flag any more. Instead, a white flag flutters from the mast of the tug. This shows that a ship was in commercial hands.
However, it also makes the Temeraire look as if she's being brought in under a flag of surrender, a further insult to her memory.