It's generally not ideal for two elements to share the same ID, even if it's just for 0.3 seconds. IDs are meant to be unique in a document to avoid conflicts with JavaScript selectors and CSS.
However, since the elements will only exist in the DOM at the same time for a very brief period, and the element with the duplicate ID will be removed soon after, it shouldn't cause major issues as long as the removal happens promptly.
This ensures there are no ID conflicts during the brief overlap. But for such a short duration (0.3s), it's unlikely to cause significant problems.