There are def no federal building codes regulations that apply country-wide to SFH.
Its a completely state based thing. Up to the state if to adopt one, feds have no authority here.
And then in many states its up to the county or township or city/town if to enforce codes (which theselves would l be state or township based)
I used to research entire country for years on this subject, and lived off grid in more than one state on own land, before I eventally decided to go nomadic again before I move overseas. Ticks and tornadoes got me.
There are places where you can live unmolested in whatever way in states with building codes but no county or township enforcement outside town proper. For now.
They might ask for septic or might say nothing at all or let one have a Lagoon (lol I had one in Missouri)
But nice weather year round and no enforcement ...I dont know of such places...
Alaska is only freedom one left, imho. In NM one technically needs a septic, uts the statewide reg but not enforced hard in some places