Could you consider Delayed Open Source Publication (DOSP) [1]? With that, you make the source code open-source after a specific period of time (such as 5 years).
This way, your customers still get the source code and can use it freely, but you don't have to worry about competition. By the time anyone could use it to compete with you, they would be using an ancient version of your software. The BUSL (Business Source License) by MariaDB is a battle-tested license designed for exactly this use case.