Based on what you've said, I am also likely to think this is a board level issue, but if you happen to have any know good parts lying around, I would test with just the bare basics and see what you get.
Take the board and and connect a known good charge port, battery and screen and see what happens then. If you're still getting the same issue, then board for sure.
If it is a board level issue this could be a Hydra problem, but I am almost more likely to think Yangtze, which is the battery charge chip itself. Hydra is more related to USB communications, but it often takes the brunt of damage where low quality or shoddy chargers are concerned. I find that Yangtze is more often at fault in these kind of situations on post iPhone 7 models. And Yangtze is far easier to replace on the XR.
Tristar/Hydra replacements are a good place to start if you're looking to get into microsoldering (do it, it's a good skill to have, on top of being loads of fun), but the XR isn't a phone I would recommend for beginners. Most experienced techs dislike working on XRs for a few reasons, The board shields are extremely stubborn, and it's risky to even try and remove them. And if Hydra is the problem, it's a bugger to replace. It's extremely close to the CPU—it's difficult to remove and easy to damage vital components. Image below for reference. CPU on the right, Wifi IC on the left all surrounded in epoxy. -_- Not my favorite repair.
[image|3302837]