I solved the problem.
Fields were added through the WP interface.
Later there was a need to add fields programmatically.
They were added, but those that were previously not displayed.
How I solved the problem:
Through tools I generated PHP code.
Copied the array of fields from there and added it to my code – it worked