Students from poorer backgrounds in Wales were almost two years behind their peers pre-pandemic, finds new analysis