That board you linked is an I2C level shifter.
I2C buses all have pullup resistors. Often in the low kiloOhms range. I suspect the pullup resistors are simply overwhelming the sensor trying to pull down to ground.
It is highly unlikely that it will be worth it to convert a MAX232 circuit to drive this PWM.
MAX232 in general uses the supplied 5V to make +/- 7 volts with a charge pump, it might be possible to make it drive 0V and 12V, but it would require an external 12V supply, and while being within absolute maximum ratings, this kind of configuration is not shown in ...