Scrolling problem due to the 'data-select2-id' data attribute which blocks my scroll down

I have a container with overflow with a min-height and max-height. Before I use one of the select2 on the page, the scroll down works very well. However, after selecting one of the select2, the ‘data-select2-id’ data attribute is inserted into my container and on certain browsers (Safari & Edge) this blocks the container’s scroll. This is very problematic.

I therefore end up removing this data attribute on scroll with an event listener so that my container can be scrollable downwards again.

HELP ME please !!!