Virtual list + Lit template items

Hello!
I have a weird issue with the Virtual List component and I’m wondering if it’s a bug or I’m doing something wrong, I hope someone can help me.
What happens is that when I replace the item provider of the list, the items suddenly get a top padding equal to the item height. (See video in attachment)
I can also see it happening when scrolling but then it gets corrected immediately. (not in the video) In my own app some items don’t get corrected when scrolling but I haven’t been able to reproduce that in the sample.

The triggering circumstance seems to be that the component I’m using for the items is a Lit component (Java LitTemplate linked to a ts LitElement, I’m using a ComponentRenderer in Java to create the item class). If I create the item in Java like the sample in the documentation does, it works as expected. However I don’t want to build the item layout in Java, I also don’t want to use an inline template string with LitRenderer. Does anyone know what’s causing this, how I can fix it? Or is this a bug?

Sounds like a bug to me.

Thanks! I’ve made a bug report https://github.com/vaadin/flow-components/issues/3900