Should Changing Puppy’s Food Cause Him To Poop Every 10-20 Min All Day And Night, Will This Balance Out?

We got our Cockapoo from breeder and within 4 day we noticed looser poop and blood in his stool. The Vet checked him and he had parasites and was on a week of medicine and boiled chicken and rice or boil hamburger diet. He improved and was only out once a night to go to the bathroom so we put him back on his puppy chow food (same as breeder). He started getting loose stool and blood again, so we had him checked out again, Vet said it probably is just that puppy food not agreeing with him. Now we have him on Science Diet small bites and he is now having solid poop and no blood but has to go every 10-20 mins all day and night. He was completely house and crate trained after 3 days home, but now if I don’t sleep right beside him at night he poops in his crate before I get to him several times through out the night and/or he barely makes it out the door before he goes. Do I switch him again or will this balance out?