This is a long story. I am a mathematician. A couple of years ago I submitted my paper to one of the best journals in my field. After 8 months of waiting, I finally recieved a response, and it was "A major revision is needed". I looked at the reviewers' comments. They were very positive. The reviewers only pointed out some typos and suggested several little changes to improve the exposition. I thought that it would take me at most a day to revise my paper.
After that, I read the the comments of the editor handling my paper (let's call him Editor D for future references). The editor wrote:
The theory ... developed by the author has been well recognized by the two reviewers. Indeed it is easy to verify that the paper is well written and organized, and that, although not all results are new, there is enough new material worth of publication.
Then I found some additional comments of the Editor-in-Chief in a separate file. These comments shocked me. Here I must say that there exist several approaches to the problem (Problem P) that I studied in my paper. The Editor-in-Chief is the author of one of those approaches (Theory X). In his comments, the Editor-in-Chief wrote that any paper in which Problem 'P' is studied must be based on Theory X, and that I must completely rewrite my paper using Theory X. Furthermore, he wrote that my paper must address a much more general problem that includes Problem P as a simple particular case.
I felt that the comments of the Editor-in-Chief were unreasonable, to say the least. Therefore I withdrew my paper using "Withdraw" button at the website of the journal, and submitted it to another journal, where I, again, recieved two excellent reviews, and the paper was published shortly.
Recently, I came up with an idea about how to solve the more general problem, pointed out to me by the Editor-in-Chief in a very simple manner. I wrote a paper about it, which I am very proud of. In this paper, apart from solving the problem, I also pointed out, as clearly as I could, that Theory X, in fact, cannot be used to solve this problem due to some of its limitations. I decided to submit my new paper to the same journal, since it is one of the best journals in my field, and I had already published (or submitted) papers to other top journal this year. I admit that it was very stupid of me to submit the paper on a similar subject to the same journal. But what's done is done.
After several months of waiting, today I recieved a response, which once again was "A major revision is needed". Once again, the reviewers liked my paper very much. However, this time Editor D wrote in his comments:
By the way, a paper by the same author was processed by me as Associate Editor, with the requirement of a major revision; and then withdrawn and published in a different journal. I would not replicate this experience.
The Editor-in-Chief this time wrote a proper review of my paper which, in fact, was longer than what the reviewers wrote! In his review, apart from defending Theory X, and writing that I am completely wrong about its limitations, he also said that in his opinion I mix too many things up, and I must delete a half of my paper and rewrite the other half.
So, the question is what should I do given the "warning" from Editor D? I feel that deleting a half of my paper would significantly lessen its value. I want to withdraw my paper, but some people write that its unethical to withdraw a paper after peer review, and that the journal (and the publisher, which is very big) can put me into the black list of authors.
Edit-1: I would like to thank everybody for the interest in my problem and for the thoughtful comments. I've decided to resubmit my paper without any significant changes, and reply to Editor-in-Chief's comments explaining why I disagree with them. If the paper is rejected, then I will be free to submit it to another journal. If the Editor-in-Chief insists on a major revision, then I will withdraw my paper without a second thought and inform Editor D about the conflict of interests and the reasons behind my decision via email.