@RacerX
Had a very similar problem a few weeks back.
My solution was to use the refuel boom mesh as eyecandy and add a second docking port to the XR5 itself, when the vessel that needs refueling was close enough. (via a lua script).
The vessels stay docked and no attachments or changes to the XR5's config file were needed.
Here is the video of how it looks.
The refuel boom mesh, animation, sounds and docking port get added to the XR5 once the XR2 is closer than 1 km.
The whole package is attached on this post. Have a look at the lua script to see if it's something that you can adapt to your project.
The scenario is the "Midair-Refueling(XR2-XR5)".
Additional notes:
-The XR2 and XR5 have their own config override .xrcfg files. They are set to default ISP settings.
-You will also find a playback of a successful docking in the playbacks folder.