Vaadin Flow Components not rendering correctly

Hello,
I seem to have found a strange behaviour of Vaadin Flow.
I recently tried to use a Dialog component by simply creating it on the fly like: new Dialog(new Button("Dialog")).open();.
But when the application runs this code, there is just a <vaadin-dialog> tag added to the DOM, but the component isn’t rendered anywhere. There are no JS errors either.
I have a similar problem with the Select component. But with this component when I add it to the DOM, all the options are rendered as a list at once.

Both of these errors are solved when I instantiate both components once directly at the constructor of my main @Route component. Has anyone had such a behaviour before? Are there solutions to this?

I currently use vaadin flow 14.0.6.

I am having a similar issue but I cannot get it to work by instantiating both components in the constructor:

https://vaadin.com/forum/thread/18074186/cannot-get-dialog-to-open-in-route

Can you share your code that works when instantiating both as you describe?

Edit: After cleaning my build I was able to make this work properly.