initData or initDataUnsafe data is not transmitted in the Telegram mobile app

I have a website that I enable via telegram imni app in a bot Here is the code:

if (window.Telegram && window.Telegram.WebApp) {
            const user = Telegram.WebApp.initDataUnsafe.user;
            if (user) {
                const userId = user.id;
                alert("User ID: " + userId);
                loadUserData(userId);
            } else {
                alert("User data is not available.");
            }
        } else {
            alert("Telegram WebApp is not available.");
        }

        async function loadUserData(userId) {
            try {
                const response = await fetch(`/user?user_id=${userId}`);
                if (!response.ok) {
                    throw new Error('error');
                }

                const data = await response.json();
                document.getElementById("nickname").textContent = data.nickname;
                document.getElementById("avatar").src = data.avatar_url;
                document.getElementById("money").textContent = data.money;
            } catch (error) {
                console.error(error);
            }
        }

The problem is that telegram should pass the parameters initDataUnsafe and all the information on the user, as he came through telegram to the site In the web version of telegram everything works as it should and tg passes the data I need in initDataUnsafe, but in the mobile application of telegram initDataUnsafe is empty, that is, telegram does not pass anything, help to understand why it is so