@KMETE Yes.......
Send the button data into [sel 1]
Connect a bang to its left outlet.
It will only bang when the button is pressed (1)........ not when it is released (0)
Feed the bang into a [toggle] that will then output 1 or 0 for each bang it receives..

You can set the toggle to always be on or off as the patch opens using the "init" button in its properties window.....

If that is also unreliable then it will be because of switch bounce.
You can debounce using a [delay] to stop data within a time window.
There are a number of ways to do that....... https://forum.pdpatchrepo.info/topic/12092/debouncing-was-measure-time-between-two-bangs-events
David.