The Second Circuit has determined that non-citizens who entered the United States without inspection years ago are detained under 8 USC 1226, not 8 USC 1225.
The full text of Barbosa da Cunha v. Freden can be found here: https://ww3.ca2.uscourts.gov/decisions/OPN/25-3141_complete_opn.pdf