Why does post-slug not get saved for drafts?

I run into a similar issue. I had to remove remove_meta_box('slugdiv', ['post', 'page'], 'normal'); from my code. When you remove the slugdiv meta box the slug edit box for WP does stops working.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)