Replace your _process function with the following code:
func _process(delta: float) -> void:
if linear_velocity.length() > 10.0:
rotation = atan2(linear_velocity.y, linear_velocity.x)
As long as the rocket is moving at least 10 pixels per second, it will be rotated to face in the direction it's currently travelling at. This code assumes the front of the rocket to face the positive X axis by default.
Depending on your needs, you may not need the condition at all (example: rocket is destroyed when it hits something), or need a completely different one (example: rocket is able to fall and freely tumble). You could also experiment with changing the rotation gradually using rotation = lerp(rotation, atan2(linear_velocity.y, linear_velocity.x), 20 * delta).
I can't write comments yet, so I will have to say this here: Jonathan F.'s answer is not satisfactory because an object flying on a non-circular path (such as a parabola) does not rotate at a constant speed. The angular velocity would need to be recomputed every frame, but what is the correct formula to make sure that the rocket is always facing the direction of motion? In the end, perhaps a mix of both is needed: Setting the rotation to make sure it doesn't drift off, and setting the angular velocity so that the rocket behaves nicely in physics interactions.