however if you do the inverse, and cover up the top and bottom and only leave the two middle bits, you can see they are indeed two separate colours.
Well yes that's the idea of an optical illusion - it's not what is actually there, it's what your eyes/brain are interpreting as correct. As the join/middle cannot be seen when covered, our eyes make best judgement.
But at @RabbieBurns is right. The bottom panel is lighter in the fact that the highlight at the middle join simply doesn't exist on the top panel. It would be a good illusion if both panels were exactly the same, but they are not.