Database file size from sys.master_files and sys.dm_io_virtual_file_stats are different
Just from looking at the query results on my local development instance, there are two differences that I see (there are probably more):


sys.master_files returns the "virtual" size of a file, while sys.dm_io_virtual_file_stats returns the on-disk size of the file. I only see different sizes for database snapshots, which use NTFS sparse files behind the scenes (and I did verify the allocated and on-disk sizes in Windows).
sys.dm_io_virtual_file_stats does not return sizes for databases that are offline, while sys.master_files does.


For the case of tempdb, sys.master_files contains the startup file sizes for tempdb. If you investigate sys.database_files in the context of tempdb, you'll see the current sizes.