If you are using ACF fields values to generate your value then you need to us the acf/save_post action instead of wp_insert_post_data. ACF does not save fields until after your filter runs so you are seeing the old values of any fields and not any changes. https://www.advancedcustomfields.com/resources/acf-save_post/
If you want to use the hook you’re using then you need to look in $_POST[‘acf’] to get the new values. This is covered on the above page as well.