The bill would apply to detainees released after Feb. 1 of this year.
Only a small group in the House opposed the $200 billion legislation.
Schock delivered his farewell and also broke House rules, posing for a floor pic.
Two New York police detectives were shot in the line of duty in December.
The GOP dissenters included hard-line conservatives and centrists.
An amendment to boost defense spending was adopted by a vote of 219-208.
The Progressive Caucus, Black Caucus and House Democrats each offered alternative fiscal visions.
The RSC budget would cut $7.1 trillion in spending over the next decade.
Final votes on the budget are expected Wednesday afternoon.
House Rules Committee Chairman Sessions claimed the law will cost $5 million per person.