What it comes down to is firepower, not hull material.
Sub has a single 3 or 4" gun, most likely with a dual mount 20mm aft for AA. The AA guns have limited traverse and except to the rear probably can not depress down to engage a PT boat.
PT boat has a 37mm in the front that firing HE CAN penitrate the hull of the sub.
And a 40mm in the rear that can also do the job.
Add to that the fact that it has 2 dual .50's and a 20mm which can engage the subs deck crew.
Probable scenario goes something like this.
Sub fires deck gun, pt swerves, shot misses.
PT fires all forward guns, kills half the subs deck gun crew, increasing reload time.
Sub fires deck gun again, close on line but either long or short (hard to judge PT's speed, and its moving fast!)
PT continues to pour fire into sub's deck gun, disabling the gun, killing the crew.
Turns to the side so the rear gun can bear and starts pounding at the waterline.
PT parks 100 yards off the subs side and continues to blow holes in it until it sinks.
Pt goes home for barbecue and beer.
The PT boat is 4 times faster, nimble, and hard to hit.
The sub is 4 times bigger, slow, turns slow, and just needs 1 very small hole in its pressure hull, and it can no longer dive.
Once it can no longer dive, its easy meet for air attack. Which if the PT can't sink it on its own they would do.
Last sub fires a Torp at the PT, which is very unlikely to get a hit the pt boat.
Be it through manuver, not enough metal to set off the magnetic detonator, or is not able to run shallow enough to physically hit the PT boat.
PT fires a torp at the sub, which hits it and breaks it in half.