There were couple of enhancements done lately to listening sockets, among them the ability to associate names, so one can enforce sending socket by name and record route will also take that in cosideration.
If this issue is still not solved, then open a new item here with data collected from Kamailio 5.4 or master branch.