XSSFDrawing.getShapes() changes Anchor type. The method calls getAnchorFromParent() method which suppose to return an anchor of the picture. Instead getAnchorFromParentcreates a new anchor anchor = new XSSFClientAnchor(ct.getFrom(), ct.getTo()). The anchor type is not set in XSSFClientAnchor constructor, that's why it is set to default (which is zero for int properties). As a result every time you call getShapes() method you set the anchorType of every picture/graph to 0 which is "move and size with Cells", so getAnchorType() will always return 0.
Would you be willing to write a unit test and patch for this? Seems like you're fairly familiar with the code.