Is it Code legal to hardwire a refrigerator in a basement?
You cannot cut the cap off of a cord to make it hard wired; 1) you are modifying the equipment, i.e. not being used in its intended manner, and 2) portable cord is not allowed for permanent connections. And forget the idea that commercial refrigerators and freezers are hard wired to get around the GFCI requirement, they are required by code to have GFCIs regardless of how they are connected, have been since 2008. 

Most MODERN refrigerators and freezers have been designed now to NOT trip GFCIs because of the impending requirement changes. So in reality what the main effect of this will be is that you will likely have to get rid of your old ancient garage beer fridge and upgrade to something built in the last 10 years. Just from an energy efficiency standpoint you should probably do that anyway. Around here, my utility will pay you $75 to get rid of your old garage fridge.

There is a Power Failure Alarm unit I found and used on a sump pump once, it would work for a fridge as well. It can be ordered with an alarm contact that can be wired to an auto dialer or security system, but now I think you could also wire it to a sensor for a "smart speaker" system too.