post_type_link not working in gutenberg

This will not work with ACF or any other “old style” meta fields. Gutenberg saves posts in two steps. First, it uses REST API to save all “new” fields, i.e., fields created in blocks or Gutenberg sidebars. Then it creates another POST request to save all “old style” fields created in meta boxes. ACF falls into second category even if field is visually displayed in sidebar.

The problem with permalinks is that they are created (and your post_type_link functions are fired) during REST API step, when meta field values are not yet available. You may try to add some save_post hook to update permalink during second step (after meta field values are saved), but then you’ll have permalink incorrectly displayed in admin UI until you re-open post for editing. Proper way would be to create Gutenberg sidebar for fields that are used for permalinks. Those fields are saved using REST API and are available in post_type_link calls (via get_post_meta).