I think it is just a recommendation. It might not be mandatory.
See Vashishta Smriti 7.3.7.1-3:
1 There are four orders of life: student, householder, forest hermit
and wandering ascetic. After studying one, two, or all the Vedas, a
man who has not violated his vow of chastity
may live in whichever of these he prefers.
The Manu Smriti also says "He may" .. that means there is an option.
6.1. A twice-born Snataka, who has thus lived according to the law in the order of householders, may, taking a firm resolution and
keeping his organs in subjection, dwell in the forest, duly (observing
the rules given below).
6.2. When a householder sees his (skin) wrinkled, and (his hair) white, and. the sons of his sons, then he may resort to the
forest.
6.3. Abandoning all food raised by cultivation, and all his belongings, he may depart into the forest, either committing his
wife to his sons, or accompanied by her.
It is not mandatory because, Manu Smriti says, in whichever order a person is residing, he is fit for liberation, if he has understood the true purport of Vedas. So, for such a person it is not required to live the life of a forest hermit as a rule.
12.102. In whatever order (a man) who knows the true meaning of the Veda-science may dwell, he becomes even while abiding in this world,
fit for the union with Brahman.