While both cables are suitable replacements for Thunderbolt 3 docks, Thunderbolt 3 capable devices can be interconnected using a Thunderbolt 4 cable.
With backward compatibility being one of the design criteria Intel used, you'll have the same performance as with a Thunderbolt™ 3 device, so we recommend replacing your Thunderbolt 3 cables with a Thunderbolt 4 cable if a future-proof solution is desired.