AxonometricView.ByEyePointTargetAndBoundingBox not working

I am trying to create an isometric view of a set of pipes and fittings to automate the process of making sheets.

I want the view to be cropped to the bounding box that contrains the set of pipes and fittings. So I start by selecting all elements, getting their bounding boxes and extracting the max and min points. From there I generate a new bounding box from the largest max points and the smallest min points to contain all elements.

When I then try to execute the AxonometricView.ByEyePointTargetAndBoundingBox it fails with error:

AxonometricView.ByEyePointTargetAndBoundingBox operation failed.
Value cannot be null.
Parameter name: obj.

I can execute the AxonometricView.ByEyePointAndTarget node but when I try to add a sectionBox using Rhythm it also fails.

This was all working fine on Revit 2020 but ever since upgrading to 2022 I cannot get it to work anymore.