This is a known issue in Live Editor from R2019a.
As a workaround, please avoid to use the graphics root object "groot" ( = 0) to set FontSize of your single figure. FontSize property in the axes object will help you to set your FontSize.
Also plese note that "groot" changes ROOT settings of the graphics object in MATLAB. I recommend you not to use "groot" casually.
h = plot(1:10);
ax = gca;
ax.FontSize = 20;
legend(ax, 'FontSize', 20)