How does your ad block work? Is it looking for ?topic=foo& in the URL? topic is not a variable that GL spends any time ensuring you can find. It's very contextual and staticpages is not one of those contexts where the code doesn't care about the topic.
Also remember staticpages are a plugin, the block editor has no concept that there are such things as staticpages.
You seem to want hierarchical topics. GL only supports a single level of topics.
COM_getCurrentURL is in lib-common.php. I'm assuming that your ad blocks are phpblocks that you've included in your lib-custom.php. That code could get the current URL and attempt to detemine the topic by querying the topic from the staticpage.