If you expand the hard disk item whose size is grayed out, you will see that the snapshot file is listed as a "Disk File".
Example of a display if a snapshot file is listed as a "Disk File":
[DatastoreName]VirtualMachineName/VirtualMachineName-000001.vmdk
Example of a display if a snapshot file is not listed as a "Disk File":
[DatastoreName]VirtualMachineName/VirtualMachineName.vmdk
vSphere 8.0
If snapshots exist for the target virtual machine, you cannot change the virtual machine's hard disk size.
Delete all snapshots for the target virtual machine before expanding the hard disk.
For instructions on deleting snapshots, refer to the document below.
If no snapshots are displayed on the "Snapshot Management" screen and the following message appears in the "Issues and Alarms" section of the "Summary," consolidate the snapshots.
Virtual machine consolidation needed status
For instructions on consolidating snapshots, refer to the following document.
For more information on deleting/consolidating snapshots, see KB 371714 below.