PJ’s sketch works fine with BSP3.2.0 and 2.0.17, regardless of whether there is a pull-up resistor or not.
There seems to be a problem with the hardware or connection.
Is there a problem with the connection?
What is “castellated soldering”?
Are the soldering methods for nRF52 and C3 different?