The cost of the Twitter acquisition to much will have been much more than $40B. Since he had to liquidate stock to make the purchase happen, you don’t get face value for the sells and the lowered stock price is then reflected in the rest of his net worth.
I’d be surprised if the hit to his net worth from the purchase as less than $80B