Labeling objects that aren't perfectly vertical or horizontal

Hi, I’m working on a CV POC that is looking at rectangular objects that are either horizontally or vertically stacked. I’ve had great success using Object Detection to train the model on pictures of my rectangular objects when they are perfectly vertical and lined up. I can easily draw the bounding-box around each rectangle, and it does a very high (97%) matching on those.

However, when the objects are leaning by 5-15deg, think books leaning on a bookshelf, then drawing the bounding box inevitably ends up capturing the rectangular objects next to it. This matching is much, much worse.

Should I be using something different than Object Detection? Or is there a way to orient the bounding-box at an angle?

Thanks