'Drawer reopen Sometime when change screen

I am using react navigation drawer v6 with custom header when click on hamburger menu it show drawer its work fine but when I navigate from drawer it change screen and reopen drawer sometime . I dont its a bug Or something else .I am attaching gif of behavior. How can i fixed this Issue. enter image description here



Solution 1:[1]

I fixed it by adding useLegacyImplementation to true in my drawer navigator. it worked for me . here is reference

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Zeeshan