How to use JSN SR04T

I'm using this ultrasonic sensor to measure water levels

I used the code from this website

#define trigPin 2
#define echoPin 3

long duration;
int distance;

void setup() {
  pinMode(trigPin, OUTPUT);
  pinMode(echoPin, INPUT);

void loop() {
  digitalWrite(trigPin, LOW);

  digitalWrite(trigPin, HIGH);
  digitalWrite(trigPin, LOW);
  duration = pulseIn(echoPin, HIGH);
  distance = duration*0.034/2;
  Serial.print("Distance = ");
  Serial.println(" cm");

Thats the code.
Now my problem is that I keep getting errors everytime i place the sensor in a closed water container. I want to measure water levels in a water gallon that stores upto 19 litres of water.
I read the specs of this sensor and it says that it has a measuring angle 75 degrees. So that means it will detect any obstacle within that measuring range? And how do i deal with this? Is there maybe a problem with the code?
When i measure it in an open space with lots of room I get close to accurate results. But as soon as i place it near the gallon i get 8 inches or other errors? How do i deal with this?

It may see the sides of your tank indeed. Anything within the cone will be registered.
Echoes are another source of error, but you wait 100 ms between readings which is normally long enough but you may change that, too.

I've come across standpipes. They are used for ultrasonic sensors as a wave guide. Will that work? Ive experimented with the code many times.