XMPP implements the exact same encryption method as Signal.
The problem is not the encryption, but everything around it. Signal has certain trade-offs due to its centralized nature (that are made significantly worse by being under US jurisdiction), and XMPP has other tradeoffs due to its decentralized/federated nature.