Problem with oulier filter

I have created template sensor to calculate power consumption of my electric owen/induction hob combo (unfortunatelly installation of physical monitoring device would be very troublesome, so I decided to go this route). Logic is very simple (since this is the last not covered by other means device) I take total consumption of my house and deduct sum of consuptions of all other individual devices. Works reasonable well, but… Since other devices measurements are combination of what physical devices are reporting, dedicated measuring devices (various Shelly modules) and Powercalc virtual sensors, with quite few of these being templated/calculated, I run into race condition that causes value of this sensor being miscalculated with large peaks lasting for few seconds (especially when other high consumption devices are turned on/off). Chart below shows how it looks in reality. Yellow is actual calculated value of owen power consumption and green is the same vaule after appkying outlier filter to remove spikes.


As you can see spikes are removed (good), but then value of filtered sensor does not return to zero (bad) for long time (in fact up to some next spike). Here is the code for my filter sensor:

  - platform: filter
    name: filtered_owen_power
    entity_id: sensor.induction_owen_power_total
    filters:
      - filter: outlier
        window_size: 8
        radius: 2500

As you can see window_size is set to 10, as this is actualy observed number of measures within spike (actually 8 + 2 events margin). Radius is 2500 as this is equal to maximum allowed/expected jump in consuption (from / to zero).
The problem is when the cooking stops and source template sensor returns to idle value (that is given by template and does nto change)… that might last for quite long time (untill next spike or next cooking). This result in very long ‘remnant’ value of filter, that is obviously not correct and obviously later results in large, unrealistic energy reading for this sensor. How this can be avoided? Any other special filter otion to set or application of another filter?