The problem seems to be related to the first line of the adsense code "<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>". I am not sure why it's not working? But to fix it, just put the first line of the code as the second line and it should work fine. I was able to fix it putting the first line of the code as the second line like this.
<ins class="adsbygoogle" style="display:inline-block;width:300px;height:250px" data-ad-client="ca-pub-XXXXXXX" data-ad-slot="XXXXXX"></ins>
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<script>(adsbygoogle = window.adsbygoogle || []).push({});</script>