The code above shows example of implementation of Telegram WebApp and sendData method at line 90. In my first attached video I try to push button which calls sendData in iPhone 11. It works fine. Second video – macbook 2015 under macOS Big Sur 11.4. It doesn't work.
Same behaviour is in macOS Telegram beta client.
Telegram macOS 8.8 (232680) STABLE, MacBook Pro 15", 11.4