I completed my Ph.D. a few months ago, but it was 4 years of a living hell. My PI was super abusive, I had severe depression and when I said I wanted to defend (6 months earlier than the deadline) because I couldn't bear it any longer she said: "you will only defend if I want you to". Anyway, I spent a year abroad, funded by an agency, and when I came back with the data she said it as bad work and unpublishable. I still wrote a manuscript (after the Ph.D. ended and I no longer had funding) draft without any participation from her and any result coming primarily from her lab. I recently shared it with the authors and she is taking it as if it was her work, sharing with random people and claiming she is senior author, which I don't agree since she didn't contribute at all (not even with experiments planning). My question is: do I have a saying on the authorship order? I feel like it's my work and I should be able to decide that, especially after everything she put me through.
I'll give the self defense answer. If your advisor has power over your future, then I advise you to go along. But move away from her orbit at your first opportunity. What she is demanding is unethical and seems to be trying to boost herself at your expense, rather than supporting a former student as she could.
But if that power is there, and she has a grudge, then she can use that power to affect your future. You probably don't have any countering power to contest it, though some do.
The order of authorship, I'll add, varies greatly by field. In some fields there are tremendous fights over it (lots of evidence in posts here). In other fields we just list contributors alphabetically, but they need to contribute. Some with very minor contributions show up in acknowledgements, but not as authors. My advisor (mathematics) helped me a lot and did, in fact, contribute to my dissertation, but no one would have thought he should be co-author. But he was acknowledged and cited.
In other labs, the PI is always listed (often last) and people make different assumptions about that. Some have said they always assume the last author did all the work. Others assume the last author provided funding and encouragement, nothing else.
But, in your case, think long term about your career and protect it. This paper may wind up with, to you, an unhappy listing of authors, but it won't be your last work, nor, one hopes, your best. If you need to submit to protect yourself, then do so, but, as I said, move away quickly. Don't look back. Find a better circle of collaborators.
Authorship is a delicate issue, and students have limited leverage when it comes to author lists. It may be that your supervisor was not involved in the writing of the paper, but she apparently contributed to the work so she should probably be an author. Usually the senior researchers will just who has contributed enough to be co-author.
Just like in a parade, ther are two prized position in an author list: first and last. If it’s politically tricky to be first author, then be last author. Indeed, “the boss” i.e. the person in charge, is usually last (although that may depend on the lab).
There really isn’t much to do when you fall out with your thesis director. In the long run I still believe it is self-defeating for a senior person to mistreat more junior persons, but this does not help you with your situation.