The Senate passed the measure, sending it to President Biden’s desk, shortly after the midnight deadline for funding to lapse.