Ok, I think I figured out how it works.
I just tried to switch the Battery type option between Li-Po and Custom and see if the battery percentage change based on the option. Yes it does.
If you set Li-Po, the VESC read the entire pack voltage and estimate the remaining capacity based on a preset discharge voltage curve.
Instead, with Custom the VESC calculates the voltage of a single cell with a simple mean dividing the entire pack voltage by the number of cells set. So using the thresholds “Cell voltage at X%” it will estimate the remaining capacity of the battery.
In this way it’s possible to modify the percentage shown as desired to match the lcd battery meter.