Video recording outward from your dashboard or windshield, or rearward from your back window
No problem at all in the US. You are recording scenes in which noone has any expectation of privacy, specifically a public street or highway.
Audio recording the conversation that takes place inside your car?
This gets iffy very quickly. A significant portion of US states make this illegal. Check the laws in each state you plan to travel in. Helpful search terms might be "one party consent" and "two party consent" to recording a conversation.
For this reason many dash cam makers that market their products in the US make it very quick and easy to start/stop the audio recording function. I myself own Garmin front and rear cams, and I can start or stop audio recording on both cams instantly with a single button click. I do audio when I'm alone in the car, audio-off when I have passengers.
Rear facing camera mounted in the front?
This situation I really don't know about. It's extremely widespread amongst taxi drivers, fleet drivers, and ride-sharing drivers, so I assume it's legal in at least some cases. But there might be some requirement to inform passengers with a sign or something.
While crossing the border
I think it's highly unlikely that any border officer in the US would take any issue with camera(s). If they do, then of course follow their commands at the time, whether it's to unplug the cam or completely pull it off your windshield. Then you can restart the camera(s) immediately after leaving their presence. Their professional opinion of the law is frequently incorrect and won't hold water in court. But it's better to defuse the situation long before a court appearance is necessary. If they can make a case that the camera(s) is obstructing the driver's view you will likely lose that case.
Recording in restricted areas
There are some places where video recording is prohibited. Military bases. Commercial ports. Maybe also international border crossings?
I'd like to think the border crossing officers are enlightened enough to realize that any car with self driving technology is probably recording extensively and that recording cannot be stopped. Teslas do for sure, and probably also many other high end high tech cars.
What I would do is pop that camera off the window and throw it in the cupholder just before approaching the border. Immediately after crossing, you can pull over and put the camera back up.