There is a scenario that cluster setup would fail due to a Junos OS mismatch. This is an expected behavior as per cluster design. This KB would help to understand the necessary prerequisites for configuring a chassis cluster.
A chassis cluster provides high availability on SRX Series Firewalls where two devices operate as a single device. Chassis cluster includes the synchronization of configuration files and the dynamic runtime session states between the SRX Series Firewalls, which are part of chassis cluster setup. However, in order to accomplish the synchronization between the cluster nodes, there are a few prerequisites to be considered during the initial setup:
If an issue is still seen establishing the cluster environment, please refer to the cluster troubleshooting guide for a pre-check or contact JTAC for further assistance.
SRX Series Chassis Cluster Configuration Overview | Junos OS | Juniper Networks
Resolution Guide - SRX - Troubleshooting steps when the Chassis Cluster does not come up (juniper.net)