Use replaceAll rather than replace - usually slugs are lowercase as well...
builtSlug.value = newTitle.toLowerCase().replaceAll(' ', '-')
This is a naive computation and takes no account of potential collisions in the database
I can't change slug input content. It's kind of frozen.
Can you show the template where the builtSlug input is used?