In other words if you want to work the above code with auto ads do not place fixed ads anywhere in your community.
The only way I found that seems to work properly is to exclude a page from auto ads and on this page in your community to add custom blocks with fixed ads.
This way the above code works correclty.
With ips internal advertisements when you check a specific location to show the advertisement(e.g. Just above the page footer) is there a way to exclude specific pages? ?