Measuring voltage and current from PWM solar controller

Correct.
That will short the regulator of the charger, connecting the panel directly to the battery.

As said, forget about panel voltage.
It's meaningless, because solar is essentially a current source.

Something like an INA219/226 are much better to measure voltage/current high-side.
High-side = in the + line.
Leo..