It depends on the statutory scheme for the acquisition of the federal land. In some cases the federal government has exclusive jurisdiction, in some cases concurrent, and in some it only has a proprietary interest (i.e., the federal government is the landowner but the state has legal jurisdiction).
Even in legal states, you can get a simple possession charge on federal land [0].
[0] https://www.fs.usda.gov/detail/olympic/news-events/?cid=STEL...