Trouble with Buoyancy

Here are my files for reference (if you want to use them as is, then you will need to rename MyGame to your project name).

OceanFunctionLibrary.h


#pragma once

#include "OceanFunctionLibrary.generated.h"

/**
 * 
 */
UCLASS()
class **MYGAME**_API UOceanFunctionLibrary : public UBlueprintFunctionLibrary
{
	GENERATED_UCLASS_BODY()

	UFUNCTION(BlueprintCallable, Category = "Gerstner Wave")
	static void GetWaveHeight(FVector PointLocation, float Time, float WaterPlaneHeight, float& WaveHeight);

protected:
	static float CalculateGerstnerWave(float wavelength, float amplitude, FVector2D position, FVector2D direction, float angle, float steepness, float time, float phase);
	static float CalculateGerstenrWaveCluster(float medianWavelength, float medianAmplitude, FVector2D position, FVector2D medianDirection, float steepness, float time);
};

OceanFunctionLibrary.cpp


#include "**MyGame**.h"
#include "OceanFunctionLibrary.h"


UOceanFunctionLibrary::UOceanFunctionLibrary(const class FPostConstructInitializeProperties& PCIP)
	: Super(PCIP)
{
}

void UOceanFunctionLibrary::GetWaveHeight(FVector PointLocation, float Time, float WaterPlaneHeight, float& WaveHeight)
{
	float sum = 0;

	sum += CalculateGerstenrWaveCluster(2500, 200, FVector2D(PointLocation.X, PointLocation.Y), FVector2D(0, 1), 0.5f, Time);
	sum += CalculateGerstenrWaveCluster(1000, 115, FVector2D(PointLocation.X, PointLocation.Y), FVector2D(0, 1), 0.5f, Time);

	WaveHeight = sum / 2 + WaterPlaneHeight;
}

float UOceanFunctionLibrary::CalculateGerstnerWave(float wavelength, float amplitude, FVector2D position, FVector2D direction, float angle, float steepness, float time, float phase)
{
	float lambda = (2 * PI) / wavelength;

	FVector dir = FVector(direction.X, direction.Y, 0);
	dir = dir.RotateAngleAxis(angle * 360, FVector(0, 0, 1));

	FVector2D rotatedDirection = FVector2D(dir.X, dir.Y);

	float wavePhase = lambda * FVector2D::DotProduct(rotatedDirection, position) + (time + phase);
	float s = FMath::Sin(wavePhase);

	return amplitude * s;
}

float UOceanFunctionLibrary::CalculateGerstenrWaveCluster(float medianWavelength, float medianAmplitude, FVector2D position, FVector2D medianDirection, float steepness, float time)
{
	float sum = 0;

	sum += CalculateGerstnerWave(medianWavelength, medianAmplitude, position, medianDirection, 0, steepness, time, 0);
	sum += CalculateGerstnerWave(medianWavelength * 0.5f, medianAmplitude * 0.5f, position, medianDirection, -0.1f, steepness, time, 0);
	sum += CalculateGerstnerWave(medianWavelength * 2.0f, medianAmplitude * 2.0f, position, medianDirection, 0.1f, steepness, time, 0);
	sum += CalculateGerstnerWave(medianWavelength * 1.25f, medianAmplitude * 1.25f, position, medianDirection, 0.05f, steepness, time, 0);
	sum += CalculateGerstnerWave(medianWavelength * 0.75f, medianAmplitude * 0.75f, position, medianDirection, 0.075f, steepness, time, 0);
	sum += CalculateGerstnerWave(medianWavelength * 1.5f, medianAmplitude * 1.5f, position, medianDirection, -0.125f, steepness, time, 0);
	sum += CalculateGerstnerWave(medianWavelength * 0.825f, medianAmplitude * 0.825f, position, medianDirection, 0.063f, steepness, time, 0);
	sum += CalculateGerstnerWave(medianWavelength * 0.65f, medianAmplitude * 0.65f, position, medianDirection, -0.11f, steepness, time, 0);

	return sum / 8;
}

Also I noticed in your code that also calculates x and y, which is unnecessary (and slower) for buoyancy code, which you only need Z.