I found out that there was a second overlay network that was using 10.0.0.0/24. The solution was as simple as adding that ip range to the wireguard config of both nodes.
[Interface]
PrivateKey = <private-key>
Address = 10.238.0.1/24
ListenPort = 51820
[Peer]
PublicKey = <public-key>
Endpoint = <public-ip>:51820
PersistentKeepalive = 25
AllowedIPs = 10.238.0.2/32, 10.0.1.0/24, 10.0.0.0/24