But the key that USB cable can't be long is that USB has a voltage of 5V. If it is too long, the voltage will be insufficient.
You can buy a USB cable extension cable, which is actually what you said. There are finished products.
It is said that he has a signal amplification magnetic ring, but the voltage is still very hard.