How we replaced jquery_ui module without losing it?
composer replace and a repaired copy of the jquery_ui in the jquery_ui folder inside of the new module jq_ui!
Steps to replace jquery_ui:
Step 1) composer require drupal/jq_ui
Step 2) drush en jq_ui -y;
Step 3) drush cr;
Step 4) Sip from a marguerita.
Thanks to a directive in composer.json file of the jq_ui module
<code>
"replace": {
"drupal/jquery_ui": "^1.7"
},
</code>
and also an improved version of the jquery_ui in jq_ui