But I thought you said that the purpose of this “block” was to prevent the second call??
So how can you say that it’s “acting as it should” if it does not prevent the second call?!
I think you need to explain more clearly what you mean by this “block”.
Ensure that there is one - and only one - point at which the GPIO can be accessed, and maintain a flag to indicate whether access is allowed…