The file name attribute is not accurate to display file size correctly. As I understand it, it's updated when the file is viewed in Windows explorer because the file name attribute is part of the INDX blocks for folders. So it's easier when you navigate to show what you have in the directory tree than to re-parse the file record to find it's size. There are also other sizes in the file name attribute structure that refer to the attribute's name and the actual file name size.
The accurate size of the file is given by the DATA attribute (type 0x80) and a file might have multiple data attributes. The unnamed DATA attributes are the main content of the file.