Register JS files at the end of the body tag in the Control Panel
You can set the CP asset as depency then it will be loaded after it

{% do view.registerJsFile("&lt;CDN_URL&gt;",{
    depends: 'craft\\web\\assets\\cp\\CpAsset',
    position:3
}) %}


That's because Yii2 will always register Bundles without any dependencies first / in the order they are defined. If you require the CpAsset it will be loaded afterwards