Item is not being updated on every iteration of a rule

I noticed that a Number:ElectricCurrent item is not being updated on every iteration of a rule.
This was happening where the item was being written to on several occasions inside the rule. If I modify the logic so that the item is only written to once inside the rule there isn’t an issue but requires using additional items and is a work around. I am not sure when this issue started. Upgraded to OH 4.2.3 on a Raspberry Pi 4 but still have the same issue.

The setpoint below will not always update to 32A even though the logInfo appears in the log. Will update for a couple of iterations and then not update on the next. Any ideas?

KebaCurrentSetpoint.sendCommand((SonnenGridCurrent.state as Number * -1) + KebaI.state as Number
if (KebaHyundai.state == ON){
if (KebaCurrentSetpoint.state > 32.0 | A){
KebaCurrentSetpoint.sendCommand(32.0 | A)
logInfo(“Keba”, “Setpoint to 32 A”)
}
}

You should not check the state of an item, which got a ‘sendCommand’ within the same rule.

you may try (if it’s not rule DSL)

var setpoint = items.KebaI.numericState - items.SonnenGridCurrent.numericState  ;

if (items.KebaHyundai.state == ON){
  if (setpoint > 32 ) {
    KebaCurrentSetpoint.sendCommand(32); 
    console.log('setpoint 32 A');
  }
  else KebaCurrentSetpoint.sendCommand(setpoint);
}