If something has a captive cable, you simply can't add any extensions to it. It was designed for SI and power drop for exactly that length of cable, and any arbitrary amount of extension cable you add was not designed for by the product maker.
When the product has a receptacle however, it becomes MUCH more flexible.
You don't have to use an extension cable. You simply need a C-to-C cable of sufficient functionality and length as your requirements.
Forget your Anker dock. Use this one instead:
It comes with a short 2" cable. You are not required to use that short cable. By the spec, any spec compliant cable with support for SuperSpeed USB will work in its place, regardless of length. Replace it with a 1.8m cable for 5gbps operation:
https://www.amazon.com/AmazonBasics-USB-Type-C-Gen1-Cable/dp/B01GGKYVSY
Need longer than that? Replace it with Apple's 3m Thunderbolt 4 Pro cable.
https://www.apple.com/shop/product/MWP02AM/A/thunderbolt-4-pro-cable-3-m
The 3m cable is super overkill, because it supports protocols you probably won't use with that dock, but it does things correctly because it reaches 3m by using some highly complex active signal conditioning technology. Hope this helps.