Sounds like this could be a leap setting, couple of things you could check for troubleshooting:
1- Try and narrow down which optimisation setting in leap which could be causing the issue
Step 1- Go to Speed Leap dashboard -> optimisation settings -> select change settings (this is going to allow you to go to a editing area where you can turn settings off and on and preview the settings changed before activating it on the site)
Then start to toggle one of the main settings at a time off to help narrow down the area whether it be css, images, Static Asset Cache Policy, Pre-Connect, Minify, Script Execution or Content (I would recommend starting with Script Execution )
Once you toggle one off you then need to go step 2 Preview where you can then Go To Preview this change you have made. (with will open a tab with a preview of your change setting)
If you find that the issue is resolve then you have found the main area causing this, so back to the settings and click Advanced Settings for that area follow step 2 below
If you find it is not resolve go back to settings turn that one on and turn a different area off
Step 2- Once you have narrowed down the area and gone to Advanced settings carry out the same steps as above on the advanced settings by toggling 1 setting at a time and previewing it.
Once you have found the setting causing there may be options to to carry out for that setting or it may need to stay off. For example Script Delay has options to exclude a specific script rather than turning the setting off for all check out this guide https://support.ezoic.com/kb/article/script-delay
From previous experience It looks like your issue is likely Script Delay so i would suggest trying that setting out first and then using the guide above to exclude that specific script.
2- make sure there are no conflicting plugins (usually would show in leap recommendations or when you are setting up)
It can come from a speed optimisation plugin you are using which counteracts leap features so turning these off can help resolve conflicts.