I have a similar imbalance where one leg is stronger than the other, so I went to a PT for evaluation and they determined in the weaker leg, the femor may be slightly rotated. They would have to take xrays to be certain. I have always had this imbalance and could've been born this way.
In addition, the PT ran tests and determined my gluteus medius is weak and my psoas is tight so they suggested exercises and stretches to correct it. I normally do plenty of hip stretches and acitvation drills to make sure the glutes fire prior to working out and foam rolling, but not the specific ones the PT suggested.
And I'm not sure if this will correct my imbalance at the end nor is the PT sure it will. But I'll give those stretches a try and see if it fixes it but i am skeptical it won't and believe it's a structural thing. I've considered going to a Chiro but I'm not sold on them in general.
However, I've come a long way bringing the weaker leg up to par by doing unilateral exercises and while doing squats, trying to consciously use the weaker leg to gain strength. I can tell next day if both glutes are sore.
This is certainly a work in progress for me.