Flow (created to turn TV off) keeps turning TV on

This is the reply of the builder:

The app checks constantly if the TV is on / off, by accessing the TV-interface.

The TV-interface is also turned off when the TV is turned off, but after a delay. On my TV this is about 20 seconds. And sometimes the interface turns on, even if the TV is actually off.

So it is not easy for the app to know correctly if the TV is actually on or off.

The best solution for you might be to use a smart plug to turn the power completely off for the TV in the period.