Shanks is the mid gen Roger/Luffy. He's got no parallels with Rayleigh.
Some Roger Pirates thought Shanks is the Child of Prophecy or whatever, but he clearly isn't the one as it's Luffy. But if they thought he's the one, it must mean Shanks must've displayed that kind of potential. With that being said, it doesn't really mean Shanks surpassed Rayleigh. Rayleigh is almost comparable to Roger while Shanks cannot reach his maximum potential due to the sacrifice he's made. Shanks may have surpassed Roger at full power, but rn, it's not likely.