@felmue
Followup
I discovered this problem is only if you are using pins in source mode.
In sink mode they behave as you said.
My bad thanks for your help