The most common cause of what you describe is transposing the width and height setting when creating a custom paper size. Often people enter dimensions of the print based on the image, rather than entering width of the paper itself. When printing a vertical image, they will enter the final desired “width” of the print. The printer needs to know how wide the paper is. Then to make things a little more challenging, you have to print the image as “landscape” orientation, since that what it is relative to the paper size being put in.
Lr seems to manage it’s way around this some of the time. Not sure why, but perhaps there’s a little logic built into the print module.