Interpretation of Lavrentiev phenomenon by relaxation: the higher order case