Attribute (0020,0010) is the Study ID. It appears to have a character maximum that MathWorks are warning us about.
A short StudyID does not trigger this error warning; for example:
dicomwrite(blurred,['C:\filepath\dose',num2str(indexnumbers(fileloop)),'.dcm'],doseinfo,...
'CreateMode','copy','StudyID',num2str(indexnumbers(fileloop)),'SeriesDescription','interfractional error');
However, a longer StudyID does trigger this warning:
'CreateMode','copy','StudyID','PTCOG2017BlurredResult','SeriesDescription',['revised blurring for Case ',num2str(indexnumbers(fileloop))])