Most criminal laws are state laws, so you'll find at least[0] 50 different versions of any given crime. In some states, there is strict liability for an adult having sex with a minor (usually called something like sexual abuse of a minor; formerly often called statutory rape). In other states, the examples you gave would be valid defenses[1].
Laws requiring age verification have their own intent requirements. The Texas age verification law only applies when sites "knowingly and intentionally" distribute pornography[2] and imposes civil liability for sites that do so and fail to require either "digital identification" or use a commercial age verification service. There doesn't seem to be any specific requirement that they not make mistakes; it would probably default to negligence if it ended up in court.
[0] Some US territory is not inside any state, and there are federal laws that come into play when an act crosses state lines.
Cody wilson was convicted in Texas after an age verification online service verified a sugar daddy escort was 18. The ID turned out to be fake, he was arrested, charged, and found guilty although I think he got 10 years probation with some sort of arrangement to expunge the offense if he completes probation.
IIRC the state of Texas was pushing for much worse, but basically the 'victim' was going to end up getting dragged through the mud and probably be forced to admit to all sorts of fraud and felonies involved in forgery, fraud secondary to forgery, and whatever other crimes are involved when you engage in crime with falsified government ID etc so they settled to avoid her having to testify.
Texas appears to have strict liability for that specific offense, which differs from how its porn age verification law is structured, and also differs from equivalent offenses in some other states.
Most criminal laws are state laws, so you'll find at least[0] 50 different versions of any given crime. In some states, there is strict liability for an adult having sex with a minor (usually called something like sexual abuse of a minor; formerly often called statutory rape). In other states, the examples you gave would be valid defenses[1].
Laws requiring age verification have their own intent requirements. The Texas age verification law only applies when sites "knowingly and intentionally" distribute pornography[2] and imposes civil liability for sites that do so and fail to require either "digital identification" or use a commercial age verification service. There doesn't seem to be any specific requirement that they not make mistakes; it would probably default to negligence if it ended up in court.
[0] Some US territory is not inside any state, and there are federal laws that come into play when an act crosses state lines.
[1] Here's a statute from Alaska to that effect: https://www.akleg.gov/basis/statutes.asp#11.41.445
[2] https://capitol.texas.gov/tlodocs/88R/billtext/html/HB01181H...