I want to make it so that, when a post's (not page) status is published, non-admins will not be able to change the URL (using the interface shown in the image). Maybe it's greyed out or just not present? What I had been doing was just hiding the permalink editor for posts:
.wp-admin.post-type-post.edit-post-post-url__dialog .components-base-control {
display: none;
}
But this disallows URL editing before publishing. Is there a way to do this wp.data?