When you inflate a tube that is not inside a tire, even if it balloons up a huge amount, you are only getting maybe 1-2 PSI (7–14 kPa). A tube that is not constrained by a tire will increase in size without increasing the pressure inside the tube much at all. So you apparently have a very small puncture that doesn't open up until 5-10 PSI (35–70 kPa) that you can attain while the tube is installed in a tire.
Try inflating the bare tube as much as you dare to and dunk sections of it into a bucket of water and look for the smallest of bubbles on the surface of the tube. That's often the only way you'll find a small puncture like that to be able to patch it.
It could be a puncture in the tube, or as others have hinted at it could be a problem with the valve, so include that in your dunking exercise.
And sometimes you never can find that tiny leak, which means you just discard the tube and use a new one.