I will add to Dmitry and Buffy's excellent answer to point out the following.
- You say "The advisor is literally contributing zero except [...] giving some comments on a written text."
In my opinion, this makes them a co-author. He or she do not have to have physically edited the document themselves to add material or sections you had not considered, in order to be defined as an "author". In fact, I would argue that a supervisor's role in a paper by their subordinates is exactly that: to make corrections and suggest changes. Now you may disagree with respect to how important those comments were in terms of shaping the form of the final manuscript, but this then becomes more of a "how many hairs make a beard" distinction.
"My supervisor has a bad reputation of forcing their name on papers at the final stage of research". As long as point 1 above stands, they have every right, and would probably feel that you robbed them of their contribution towards this project if you attempted to remove them as an author. Remember that their contribution started way before 'corrections on the manuscript' took place. It started when you two sat down to discuss how the project should be carried forward. Any research that formed part of the manuscript which resulted from your collaboration and those discussions make him or her a valid co-author. It would have been a very different scenario if you thought of something by yourself at home and an old professor suddenly knocked on your door and demanded their name to be put on the manuscript out of the blue.
"How can I protect my work from being "hijacked" by an unfair co-authorship?". My final point is a practical one. What you consider as 'hijacking' may in fact be 'saving' your manuscript. I don't know what the norms are in your country, but in most international labs, it is common for work to be associated to the lab it came from in terms of forming a judgement about its quality, rather than the first author, unless the first author has managed to establish themselves enough in the field to be a recognizable name. I have worked with people who would refer to names via the lab rather than via the author, and would be more willing to read a paper if they knew it came from a reputable lab, and less willing if it was from a single unknown author. So, make sure that you don't shoot yourself on the foot by insisting the lab leader is excluded from the paper. It is generally in your best interests to co-publish a paper along a person who carries some weight in the field (not to mention you would be burning bridges with this person for all the wrong reasons).
Having said all that, it seems to me that the problem here is less whether your supervisor should or should not be an author from a technical point of view (though I believe it sounds like they should), but the fact that you two seem not to have the best relationship, and that this is affecting your psychology and ability to perform work in a calm manner. Now this is an important issue. One's relationship with their supervisor, for better or worse, is one of the most important factors for successfully completing a PhD, let alone getting something useful out of it, be it skills, a professional network, etc.
So, perhaps you should be focusing on the more general picture, i.e. what you could be doing to improve your relationship with this person instead, or considering a change in supervisors, adding a co-supervisor, or taking measures to protect yourself from malicious actions (assuming they're that kind of person, which I did not necessarily get the impression they are).