Partisanship and a chaotic White House have combined to undermine the opportunity for Republicans to enact the legislation they have long desired.