I have the exact same problem. Mine was working fine, and one fine day, it started doing this. I can see the output flick for a brief moment (< 1 sec) and turn off. In the history, it says device turned it off. Initially, I thought that the capacitor went bad and so it is not holding. But on inspection of the board and components, all seam to be good.
Did you find what was / is the cause for your problem?
I had a similar problem, but I caused it by fiddling with settings and forgetting that I had done as such.
There is a setting in the eWelink application that allows the switch to be used in "Inching mode", in other words, when set and a button is pressed, the power will only briefly switch on then straight off.
No problems now as I have flashed my Sonoff Basic with Tasmota, which in my personal opinion is better than the eWelink application, especially as Tasmota is not calling home to China every time I press a button.
Google is your best friend in this situation. There are dozens of videos found on youtube covering the process, which seems a little daunting at first, plus I am not really prepared to discuss flashing other software on this forum. Look out for Dr Zzs videos, this is where I got my info from; https://www.youtube.com/watch?v=chyVjtYb0EA - WARNING: by flashing Tasmota, you cannot control your device over the internet like you can with eWelink, but only works as a local WLAN. The internet really is crammed with information about Tasmota software.