Socket.io does not send domain cookies

I connect to a socket from the beta.site.com subdomain, but when connecting, only cookies from the site.com and .site.com domain are sent
Why might this happen and how can I fix it?

server:

this.io = new Server(HTTPServer, {
            cors: {
                origin: process.env.SOCKET_ORIGIN,
                methods: ["GET", "POST"],
                credentials: true,
                transports: ['websocket', 'polling']
            },
            cookie: true,
            allowEIO3: true
        });

client:

socket = io(socketEndPoint, {
        withCredentials: true
    });