You can change strings to chase after this phenomenon. In my experience, it will help somewhat but never solve the problem. I typically use 40-90 string sets FWIW. This improves things and gives an added benefit of faster transient response of the strings. Lighter strings excite(pluck) and de-excite(damp) faster that larger strings. This can bring the possibility of crisper, faster response. Words are failing me here, but I hope you get the point.
I've found that the depth/volume difference for the same note between different strings is mainly due to the pickup height, the monitor and the room. Lowering the pickups tends to help as well as tilting them. Further away on the thicker strings vs the lighter ones. A monitor able to reproduce lows properly provides the most improvement regarding this. Smaller ported cabs tend to make this worse. Volume, usually a lot of it, can create standing waves in the room which can also impact this. In the end, different size strings on a bass create different harmonics that have to be handled properly to fully solve this. The way your 'system' responds to the differing harmonic content caused by all these parameters is the root cause.
Good luck, this can be an adventure.