Are you positive the 40Gbps links are connected to the vSwitch and hence vmk enabled for vSAN?
Are you sure you don't have some multihoming configuration issue whereby the vSAN traffic is actually going out the network connected to the 10Gbps via another vmk? https://kb.vmware.com/s/article/2010877
Are you sure these are using 40Gbps-capable cables connected to a 40Gbps switch-port that is connected end-to-end to the other vSAN nodes? (Don't ever assume from your network documentation, test this methodically from hop to hop)
I vaguely recall some Mellanox driver/firmware versions/issues that result in these defaulting to 10Gbps though I can't recall the specifics off the top of head (as not really a vSAN-specific issue) - have a look on the Mellanox forums/release notes in relation to this (and/or validate which driver+firmware are on and are reasonably latest and supported pair per ESXi HCL).
If all of the above checks out then I would advise you figure out exactly where+what is limiting this to 10Gbps and if cannot figure this out with your team then open a case with VMware GS networking team to investigate further.