Calculating 3D world co-ordinates using depth map and camera intrinsics
Several things to take into account to rebuild the rendered mesh.

Camera parameters:

Focal angle, in particular to reconstitute the mesh with the good positions. See here.
Also, camera clipping planes can be used to filter the image.

Camera axis:

Camera's Z is to the opposite to the projection: we need to minus Z from the image.
The rendered image is like a mirror: we need to minus X from the image.

Image size:

If camera is not shifted (common case), it is at the center of the image.
So coordinates should be centered around the half of the image width and height and scaled in consequence.

Compositor node:

Don't normalize the depth. If normalized, the values have no mean: they are just remapped between 0 and 1.

Image format:

Don't use PNG. You can't store the wanted values in a PNG except if normalizing them and we don't want that.
Use openEXR which allows to store the Z values as they are.
Compositor settings
Use openEXR and don't normalize:

Code
Comments below for key elements:
import bpy
import cv2
import numpy as np
from math import tan
from mathutils import Vector

def point_cloud(depth,cam):
    
    # Distance factor from the cameral focal angle
    factor = 2.0 * tan(cam.data.angle_x/2.0)
    
    rows, cols = depth.shape
    c, r = np.meshgrid(np.arange(cols), np.arange(rows), sparse=True)
    # Valid depths are defined by the camera clipping planes
    valid = (depth &gt; cam.data.clip_start) &amp; (depth &lt; cam.data.clip_end)
    
    # Negate Z (the camera Z is at the opposite)
    z = -np.where(valid, depth, np.nan)
    # Mirror X
    # Center c and r relatively to the image size cols and rows
    ratio = max(rows,cols)
    x = -np.where(valid, factor * z * (c - (cols / 2)) / ratio, 0)
    y = np.where(valid, factor * z * (r - (rows / 2)) / ratio, 0)
    
    return np.dstack((x, y, z))

img = cv2.imread('C:/tmp/depth0001.exr',  cv2.IMREAD_ANYCOLOR | cv2.IMREAD_ANYDEPTH)
img = img[:,:,1]

# Get the camera
cam = bpy.data.objects['Camera']

# Calculate the points
points = point_cloud(img, cam)

# Get the camera matrix for location conversion
cam_mat = cam.matrix_world

# Translate the points
verts = [cam_mat @ Vector(p) for r in points for p in r]

# Create a mesh from the points
mesh_data = bpy.data.meshes.new(&quot;result&quot;)
mesh_data.from_pydata(verts, [], [])
mesh_data.update()

# Create an object with this mesh
obj = bpy.data.objects.new(&quot;result&quot;, mesh_data)

# Link it to the scene
scene = bpy.context.scene
scene.collection.objects.link(obj)

Results

Test file (relocate the compositor output before using it, and the file location in the code)

Also note (if useful), it seems that color management has no influence for depth.