The meta fields “yoast_wpseo_title” and “yoast_wpseo_metadesc” are considered protected by WordPress. To make an API request for them, you must first remove its protection. For this you can use the filter “is_protected_meta.”
Since this filter isn’t part of the REST API, it affects any use of these fields. Make sure the protection is only removed during API calls—which can be determined based on the constant REST_REQUEST.
First, hook the filter “is_protected_meta.” If the REST_REQUEST constant is true, then, in the callback, set these two fields as unprotected.