Of course the PWM is adjusting itself depending on the output voltage at the end of the day.
My question is how?
optocouplers are linear parts
That's what I do not understand, how can an optocoupler be linear?
This is the relationship between the two currents:

Maybe it is working in a small signal condition were the curve can be tolerated as a line....
It doesn't generate PWM impulses -- it just disables the PWM when the voltage is too high.
I accept that, make somehow sense.
Thank you so much for helping me, sorry I am slow sometime....
Once you set the output voltage the opto only needs to tell the controller when the output needs to be lowered and it works at nearly the same current all the time. Same thing with a thermistor temperature controller, once you set the temperature the thermistor sees almost constant temperature so it doesnt need to be linear either and that is because the system keeps the temperature constant. As long as there is only one set point the deviation will be small. In cases where there is some hysteresis that doesnt matter either because each threshold is a constant also, so once you set the upper and lower temperatures the thermistor always sees those temperatures.
What you can't do is assume that you can set something without seeing the output. You cant assume that either the opto or the thermistor will go to some set value unless you calibrate the system over the entire range of operation, which you dont need here. When you set the voltage or the temperature and you see the output go to that value, the system is calibrated for that one point and that one point only, but that's all you need.
Oh another thing is that if the output goes up the sensor must react by going up, and if the output goes down the sensor must react by going down, and the set point of the sensor must be repeatable or nearly so. If the sensor has to react by going down when the output goes up, then it has to react by going up when the output goes down, if that is by design. The sensor can not react by going down for both when the output goes up or and when it goes down, and it can not react by going up for both output changes either. This means the sensor can not operate at the peak of it's curve if it has that it has to be either before the peak or after it.