How do I make water buoyancy like this, but in 3D?

I am not very sure on how to start this, as I am very lost on the topic.

I was wondering if there was a way to make an asset that had buoyancy like this asset I found for 2D… but in 3D?

This was the asset: ÁGUA DINÂMICA / DYNAMIC WATER - Godot Asset Library

The simplest case of buoyancy I can think of:

extends RigidBody3D

var water_level = 0.0
var water_density = 0.997
var water_drag = 0.9

func _physics_process(delta):
	if position.y < water_level:
		gravity_scale = -water_density
		apply_central_force(-linear_velocity * water_drag)
		gravity_scale = 1.0

It’s even the same in 2D.