I was looking through the pi pico W diagram again and realized that that pins 23 24 25 are not actual pins. Maybe that is way the code did not work. Not sure but I will stick with this explanation for my self.
You can see the functions of the three pins in the table below the diagram: