pose_bone.matrix is the transform from bone-local-space to armature-space (not world-space). It is the real transform, after constraints, drivers, etc. are applied.
So you can get the transform relative to the bone's parent by first transforming into armature space with
pbone.matrix, then transforming from armature space in
pbone.parent's space with
for pbone in ob.pose.bones:
m = pbone.matrix
m = pbone.parent.matrix.inverted() @ m
Note that the matrix
m might not be a pure rotation matrix in general (although for your screenshot it looks like it will be).
Also note that this won't work if you have non-invertible matrices. Avoid scaling bones to 0.