The bill only applies to the TSA. Customs and border protection are still allowed to do so.
They are allowed if you voluntarily consent. When did border and immigration photo opt-out change for Americans?
https://www.cbp.gov/newsroom/local-media-release/cbp-introdu...
"It is not mandatory for U.S. citizens to have their photo taken."