Another idea, as the topos has the option to do Record-Route update (https://www.kamailio.org/docs/modules/stable/modules/topos.html#topos.p.rr_u...), might be somehow related.
If you do not enable Record-Route update, then you can remove the Record-Route headers for requests within dialog with remove_hf("Record-Route") and try to see if it works.
If you enable that option, then you also have to do record_route() for the requests within dialog.