Transition uses wrong leave-to class when HTML comments exists as template root
Version
3.2.31
Reproduction link
Steps to reproduce
Refer the stackblitz link and reproduce the issue by clicking on "Page A" and "Page B" navigations.
What is expected?
Transition should work as expected and noted by the transition-name regardless of existence of comments, i.e. Page A should slide left Page B should slide right
What is actually happening?
Leave transition is not updated for Page component with comments. Page A slides right on leave transition
Duplicate of https://github.com/vuejs/core/issues/5266
@posva I have tested, PR https://github.com/vuejs/core/pull/5268 can not solve this issue, so it's not a duplicate.