Calc. the efficiency of the inverter

First of all, I would like to express my gratitude to you. I really appreciate you trying to help me. Thank you very much!

About the script problem. I am referring to the example just shown:

In the first loop pass I get the following results:

Input parameter:
Ve = 500 V

f = 80 kHz

R = 25 Ohm

Output parameter:
Ia = 32 A

P = 10 kW

Va = 800 V

These are also great and work fine. So that the output in the console matches the output values in the respective scopes. However, in the second loop, the input parameters such as the input voltage, the load resistance and the switching frequency are output correctly - in the console - but the calculated output parameters such as the power, output voltage and current from the first loop are displayed. While the scopes or the calculation of the simulation seem correct so far. In other words, I get the following result shown in the console of the second loop:

Input parameter:
Ve = 600 V

f = 85 kHz

R = 31.25 Ohm

Output parameter
Ia = 32 A

P = 10 kW

Va = 800 V

In short, I expect different output parameters. These simply do not display correctly in the console. While they have been calculated correctly.