You're conflating the vendor lock-in with attractive user experience. The latter can (and should) easily exist without the former, e.g., any good FLOSS product. You only would create a walled garden (in order to not let users escape) if you plan enshittification.
Walled gardens degrade user experience in the long term, because they artificially hinder competition by not letting users switch to a better alternative when it appears.