You can use either one of them as the co-ordinator, but you can’t have both. Only one co-ordinator allowed per network - the other can’t double as a router without re-flashing.
You can use two co-ordinators to run two separate networks, one with the ZHA integration and the other with Z2M. There can’t be any crossover between them, though.