This is silly, but try connecting your right joycon backwards on the other side. So take the right joycon and turn it around so the buttons are facing the back, and slide it into the left side rail. And do the same with the left joycon on the right side.
If you do this, your right joycon connects (on the left side) and your left fails to connect, then you know it is the right side rail. If the left connects on the right side but the right doesn't connect on the left, then you know it is the joycon that failed the connection.
I have an old switch where the rail on the right side failed like over a year ago and I swap both of the joycons onto the left side every other time to get around this because I'm too lazy to fix it. 😅