Can you change the Ph. D. supervisor but continue with the same job, regardless of the opinion of the previous supervisor? Can you change the supervisor (advisor) but continue with the same job, that is, without changing research direction, regardless of the opinion of the previous supervisor, or can a job only continue with another supervisor, if the previous supervisor accepts that the next supervisor continues to guide the work?

The main question is whether the previous supervisor has ownership over the continuity of doctoral work in the legal sense.
In general, yes

There's nothing that would prohibit you from pursuing the same research direction with another supervisor, or with no supervisor at all, should you choose to. However, there are some specific hurdles that may apply.

Co-authorship requirements

It may be that for your current unpublished research (which would be your next published paper) your current supervisor meets the criteria for co-authorship e.g. substantial contributions to the conception or design of the work; or the acquisition, analysis, or interpretation of data for the work. If it is so (it'll depend on your field) then it would be required to include them as a co-author (and get their approval!) when publishing that research, and if you have a sour relationship, then that may become a problem. It's possible that in this way you may lose a paper in progress which you won't be able to publish in time, but you can proceed with other, further research in the same direction.

Bureaucratic requirements

It may be that your local university won't allow you to switch supervisors if the previous supervisor objects sufficiently - either because of some official criteria or unofficial influence, e.g. it's quite possible that in certain institutions certain faculty have sufficient clout to ensure that such a change doesn't get approved or that the new supervisor is forced not to accept you.

Funding requirements

This was the first thing that came to mind as the "same job" was mentioned in the title. Depending on your institution and the conditions your particular employment, it may well be that the funding for your position comes from a grant or some other project of your current supervisor. In that case, that supervisor has a budget for a grad student to work on research direction X, and if you leave them, you'll also "quit the job" and lose the funding which they'll be able to spend on someone else. It's possible that the new supervisor might like to work with you, but they might not (at the moment) have the budget for you, or alternatively they may have an available funded position for a slightly different research direction Y - in which case the funding for that position would require you to change your research direction.

It's quite likely that none of these scenarios apply to you. But those are the things that you'd have to verify, most likely by asking your (potential) new supervisor who'll know the specifics of your institution.