How to disable the option of subsequent publication 12 hours after the subsequent publication for collaborators?

I tried to achieve it using a piece of code from years ago, but it does not seem to work. I need to make it work with Gutenberg (WP 5.0).

Is it possible to make it work?