Dynamic Context Adaptation for Consistent Role-Playing Agents with Retrieval-Augmented Generations