In some cases, mother rats may continue to take care of their offspring after they live independently, especially if there is enough food and safe habitat. In other cases, female rats may leave their offspring within a few weeks, leaving them to find new territory and partners on their own.
Generally speaking, the time for female rats to leave their offspring varies with species, environment and individuals. If you want to know more about specific species, I suggest you consult relevant materials or consult professionals.