How to get world-space matrix of any pose bone?
Yes:
As the documentation says, a pose bones matrix is in object space, this means - unless the object has no loc/scale/rot applied, you will have to apply the objects matrix.

matrix_final = obj.matrix_world @ pose_bone.matrix

This test script adds an empty at the pose-bone.
# Assume we are in pose mode with an active bone

import bpy
from bpy import context

pose_bone = context.active_pose_bone

# we can get the object from the pose bone
obj = pose_bone.id_data
matrix_final = obj.matrix_world @ pose_bone.matrix


# now we can view the matrix by applying it to an object
obj_empty = bpy.data.objects.new(&quot;Test&quot;, None)
context.collection.objects.link(obj_empty)
obj_empty.matrix_world = matrix_final