The president has frequently sparred with Gov. Jerry Brown over the state’s immigration policies.