RouterOS doesn't have extended communities support yet (aside from the ROUTE-TARGET type one for MPLS VPN). The set-bgp-community is only for 32 bits community, hence you can't add a 32 bit ASN in there, only 16 bits ones
The workaround is to use a different community if the ASN is greater than 65535. This needs to be used on both sides, of course. Using the ASN as the first 16-bits of the community is not a requirement...An arbitrary number can be used there.