The T flip-flop system is a redstone mechanism that turns a toggled redstone sinal - as a button - into a stable one - as a lever. This mechanism works perfect in java edition, although in the bedrock edition, it does not work properly. For example, when i press a button with the T flip-flop sinal off, it is supposed to the sinal turn on, but sometimes that doesn't happen. GIF below
Linked issues
Attachments
Comments

Due to the random ticking order in Minecraft (Bedrock), setups like this aren't reliable. For that reason, I'll close this as a duplicate of MCPE-15793 for now.
Relates to MCPE-16371.
This design cannot work reliably in the Bedrock version. Your redstone torches turn on and off simultaneously. When they turn on they activate both pistons simultaneously. Since only one piston can possibly extend at a time, it's just a question of which piston gets updated first in the code. I don't know Java well enough to say why it works reliably there, but in Bedrock the order that redstone devices get updated during the same redstone tick is undefined, which means that it's random.
The wiki has a number of alternative T Flip-Flop designs, most of which work fine in Bedrock.