Polyurethane adhesives (note: there are numerous kinds) and epoxy are the go-to adhesives for glueing two dissimilar materials together. In nearly all situations I would suggest epoxy over polyurethanes for a few key reasons.
First is that epoxies are the king of gap-filling adhesives, where no joint strength is sacrificed if the mating surfaces are irregular (both if physically not flat as well as if rough/textured).
The second advantage is that no clamping is required, just having the part to be glued resting in position with only gravity holding it in place will produce a very strong joint with epoxy glue. This isn't to say that you shouldn't clamp, you can, and you should in certain situations in order to ensure parts are held in the correct alignment while the glue sets.
Note: in a woodworking context it's important to stress that using epoxies you can starve your joint if you clamp very firmly (as you should if using conventional woodworking adhesives).
I was going to mention ThisToThat as well but with a caution: it should not be considered the last word on bonding dissimilar materials. Use it as a starting point instead, then do further research (including asking here on Stack Exchange if you like).
Any clue why the liquid nail didn't seem to be enough?
Without seeing how and where the glue failed it's impossible to be definitive. But good suspects would be: insufficient glue surface area, either or both the wood and the PVA not thoroughly clean (even greases from handling can be enough to undermine a glue bond), incompatibility with hard PVC (which is noted for being a hard-to-glue material, in part because of its very smooth natural surface).
My next try will be to cut out a piece of plywood that will fit inside the PVC pipe
That would be an excellent way to do this and ensure a firm bond. With this method you could use normal wood glues to bond the plywood face to the board. If you make a good glued joint here the bond created there will be stronger than that between the plies of the plywood itself, so the plywood would need to be physically ripped apart to dislodge it.
You can use epoxy for both joints here if you like, or wood glue for the plywood-to-board joint, then epoxy to glue the pipe to the plywood. It would be a good idea to roughen the inside surface of the ply with coarse sandpaper to increase the glue's ability to hold on to the PVC.