This is what happens when I press the widget, it lasts about 1 second. The script:
tell application "System Events"
tell process "Dock"
try
click UI element "Telegram Desktop" of list 1
end try
end tell
end tell
I have just edited the widget to launch Telegram with the predefined action instead of using this script (I don't remember why I was using this), but I report this anyway in case it is useful because it started happening with the last version of BTT.