This is a link to a similar question asked in the forum
However, if you wish to align the column name as well, this feature does not exist in R2021A as of yet. Please refer to the below question for a workaround
Doc for uistyle:
https://www.mathworks.com/help/matlab/ref/uistyle.html