I am facing a strange issue with my plugin. It can also be placed as a block when block widget mode is activated. The plugin has an accordion with four containers. Each container has its own form and actions. The default state of the accordion is all collapsed.
When I place this widget in classic mode, the accordion is behaving as it should, meaning all in collapsed state. However, when I place it in a block widget, by default all the container appear expanded. After about 20 seconds, all containers finally collapse to get to the desired result.
I have a fresh copy of WordPress (6.2.2) and has no plugin installed except this one. The theme I am using for testing is 2021.
WordPress version: 6.2.2 (Latest)
Installed plugins: 1 (the one I am working on)
Widget editor type: Block
Theme version: 1.8 (Latest)
The following screen capture shows how everything works. https://youtu.be/kDYlmGwgdYc