Solution:
Add flex-grow: 1 to the element that occupies the remaining position, min-width: 0; the problem is solved