Sounds like a footgun waiting to go off? Unless Adsense is pretty explicit about this, beyond some language buried in a TOS.
You have to agree to have read the policies when signing up and they've always been pretty clear about placement rules. Not placing ads on non-content pages is a pretty basic rule and would clearly apply to this since a search result is non-content.
https://support.google.com/adsense/answer/48182?hl=en#zippy=...
Adsense is designed to have as many footguns as possible.
Footguns as a service
You have to agree to have read the policies when signing up and they've always been pretty clear about placement rules. Not placing ads on non-content pages is a pretty basic rule and would clearly apply to this since a search result is non-content.
https://support.google.com/adsense/answer/48182?hl=en#zippy=...