Menu animation works from the second time after closing

Hello, why does the menu animation work from the second time after closing? (when touching the field) Please watch the video on loom to understand what I meant

https://www.loom.com/share/b0925993d5de4f14bbe4efb83f54f1b4
(way: nav menu – close wrap)

My read-only link: LINK
Here is my public share link: LINK