Is this letter grammatically correct?
No tools here for annotation.
I provide one possible correction. There are many way to go with this.
BTW: Where is the editor? Your language is not what I would use for an international editor.
The paper titled XXXX by myself and my colleagues had the “major revision” status. My colleagues and I have worked hard during this time to address all the issues raised by the referees, but to my surprise, when I intended to upload the revised paper today, I received a message that said the editor had withdrawn the paper. Please explain what has happened. Why has my paper been withdrawn? My colleagues and I have worked hard and resolved all the errors. We do not understand this. Please provide the conditions for the continuation to referee our paper after revision.
Sorry, but to my mind working hard on it has little to do with quality. I understand you want to imply obligation, but I doubt this would work. I think it entirely reasonable to ask for explanation.
BTW, did you resolve errors, or issues raised by the referees?