I couldn't find any guidelines for this on our meta, but according to posts on the main SE meta closing an older question as a duplicate of a newer one is perfectly fine if the newer one has better answers.
From the community wiki answer on How does duplicate closing work? When is a question a duplicate, and how should duplicate questions be handled?:
Which question is the duplicate?
Usually a recent question will be closed as a duplicate of an older question, but this isn't an absolute rule. The general rule is to keep the question with the best collection of answers, and close the other one as a duplicate. If the selected target question is unanswered, in most cases, the system won't even let you pick it as a duplicate target - see the "Unanswered duplicates" bullet point in Should I flag for moderator attention? below for more info.
If one question has great answers but bad wording, and the other has poor or no answers but great wording, edit the badly-worded question and close the other one as a duplicate.
If in doubt, close the more recent question as a duplicate.
The goal is to point people at a definite answer to a certain question, so if a newer question has a detailed or accepted answer then
The point is to steer people towards definitive answers to a question, and if both questions have an answer then we may as well go with the higher quality one.
In this case the newer question got more attention, more answers (including a rewritten version of your old answer), and one of the answers was accepted, so I think it was the right call to close the older one rather than the newer one.