Will Time Machine recognize my account if I change the user name? macos allows you to change your user account name (the name of the home folder) (https://support.apple.com/en-us/HT201548). My question is, will this affect the Time Machine backups of this account? I don't want Time Machine to think it's a new user and start backing up from scratch. 

For example, suppose the current account name is "Fred" and TM backups exist for Fred. If I then rename Fred to "Barney", will TM recognize that Barney used to be Fred, and continue making incremental backups? Or will TM think Barney is an entirely new user, and create a full back up?
No, it wont see the files as the same files. 

Time Machine has no deduplication or moved file capabilities, so if you were to make a new user folder (which is what the short name is), your new user folder would double up the space on the backup destination. 



Now, all is not lost, since you can use a tool like Daisy Disk or just Finder to calculate all sizes. Once you know your backup drive has room for the extra new files, just make the change you want. Over time, the older backups thin and you can also go in after a month or three or however long you want to delete all backups of the old user folder.

If you know you don’t need your backup files, you could even delete them before you change things, but you are on a trapeze without a net until the first backup completes. And you lose backup history of changed and deleted files. 

Better to just double up and wait. At some point, those old backups are not needed. Or - just consider when the drive fills - duplicate files or not - just put that old drive on a shelf or in storage and buy a new drive. Start with the new backups. The time you will lose trying to micromanage backups isn't worth the cost of a TB drive for many people so even though you are well armed knowing that changing path to a file makes a new backup, it's not a large problem in practice for all but the most cost conscious people.

Buy advice is go be Barney and let Fred sit until you're sure you don't need that past data and then erase that when you need to and not when you make the initial change.