As with so many answers on this forum a lot depends first on what codes are adopted in your jurisdiction, and second, how your AHJ interprets those codes.
The "residential code" is kind of a more specific subset of the "building code." Sifu's response is excellent. "...identification of something as residential or commercial can be misleading when it comes to building and fire codes."
When you identify what codes are adopted for your location, then look to the scope and applicability sections. For example the residential code in my jurisdiction says:
R101.2 Scope
The provisions of this code shall apply to the construction, alteration, movement, enlargement, replacement, repair, equipment, use and occupancy, location, removal and demolition of detached one- and two-family dwellings and townhouses not more than three stories above grade plane in height with a separate means of egress and their accessory structures not more than three stories above grade plane in height.
Then you would need to find out if your AHJ (Building Official, Commissioner, Inspector, etc.) is willing to consider the building in question to be accessory to a dwelling that qualifies for the residential code. Based on your description I think that is very unlikely.
To get better answers here please provide more information. Specifically, why do you want to reclassify this building?