Hi,
That probably depends on shape you use. Assuming you use sphere for example you could edit radius by:
$CollisionShape.shape.radius = newRadius
I know you're not using sphere, but it's just example because I remember it have radius
parameter. For other shapes you need to check it parameters.
Also remember that only changing height will probably make your shape shorter at the top and at the bottom equally, so probably you also should move it down (half the value of height you substracted).
Edit: at least that is how it worked for godot 3.x I don't know if there are differences for godot 4.