Stop a Relay H-Bridge for Brushed DC-Motors to get burned
The arc is formed when the moving relay contact moves away from the 24v terminal and draws the arc to the 0v terminal of the relay. So the arc forms from 24V to ground, and can destroy the relay as the current becomes uncontrolled.
There are specific relays designed for use in the H-Bridge Mode. For example the G8NDL from OMRON are specifically designed to deal with the arc. It is only suitable for 12V systems however.
24V makes things much more difficult as the arc is much worse. There are a few choices:

You can use two separate dual relays, opening and closing each contact with a dwell time of 100ms or so. 4 coils, 4 contacts.
Insert a MOSFET from the Grounds of the relay to 0V, and use the mosfet to interrupt the voltage, while switching the relay polarity.

Option 2. is often more cost effective.
Update - There are also specific 24V relays with wider contact gaps, intended for truck applications that could help. For example the Fujitsu FBR572 / 582.