if the distance measure DECREASES when actual distance INCREASES, then it's a classic case of crosstalk.
With a large number of zero-distance "bad' photons averaged with the ones that did what you want 'good photons' you will under-range. But as your target gets farther away there will be fewer 'good' photons and a fixed number of 'bad' ones, causing the number to go distance measure to decrease.
If you've done a good calibration, you will get a value for the number of 'bad' photons. You can simply increase that number and try again. Be sure you are using a current driver, there was a bug in this area a couple of years ago.
please note you have to calibrate, extract the value, store it in your memory and re-write it back into the sensor at every boot.
I'm guessing it's this last requirement that is messing you up.
If this or any post solves your issue, please mark them as 'Accept as Solution' It really helps. And if you notice anything wrong do not hesitate to 'Report Inappropriate Content'. Someone will review it.