Personally, I don’t see any problem with it, being that the studs behind the refrigerator are completely removed and the entire area behind the refrigerator is open and accessible.
But, since Article 100 doesn’t formally define what a wall or doorway is, I think that determination would be up to the judgment of the local AHJ.
I would give him a call and see what he thinks about it. He may have an issue with the cord not being long enough to pull the refrigerator out when connected, but I don’t think that would be an actual code violation in itself.