It should be closer to the analytical solution if it’s just a beam. Can you share the files and analytical solutions ? There might be a mistake somewhere.
Notice that this first mode shape is in the direction perpendicular to the normal bending of the beam. The analytical solution actually applies to the second mode shape in this case and thus the discrepancy is smaller. When I was preparing that tutorial, I tried different cases and a long simply-supported beam with a square section turned out to be the best for comparison with an analytical solution.