Non-contact level detection

I am trying to use ultrasonic sensor (HC-SR04) for non-contact level detection. For example, detecting if a milk container is empty. Ideally, I would like to place the container on the sensor and detect the milk level.

But, it seems to me that the sensor can only detect the first obstacle, in this case, the container.
Could you suggest a solution for this?

Thanks,
Nahid

Measure the weight of the container and calculate level from density and area?

Thanks for the reply.

I looked into weight and pressure sensors. But, wanted to avoid the step of measuring container weight.

To measure the level in the container, you would have to put the ultrasound device at the top of the container, above the liquid, and measure the distance downwards from the detector to the liquid surface level.