Suggest does check if the url is already taken, it only formats the provided string to a valid url.
An easy solution is to catch the specific error and keep trying to save with a suffix on the url (“url_1”, “url_2”).
Also check: How to check for URL conflicts without creating a entity?