So I know there is a way to do this using trigonometry but I found the rounding errors were too much for my purposes.
My solution was to use the transformation matrix:
translate the matrix until the rotation point is at the origin
rotate the matrix
translate the matrix until the rotation point is in the center of the screen
This solution takes advantage of the fact that order of operations matter when changing a matrix but it seems a bit different in Godot. The only way I've managed to actually update the transform successfully is by using
draw_set_transform(position, rotation, scale)
But that doesn't allow me to set what order the values are applied in.
I also tried this:
draw_set_transform_matrix( transform )
But that doesn't work at all and I don't know why, I think it would have the same problem anyway.
So is there a better way to do this like setting the origin at runtime or editing the matrix directly without going through Transform2D?