I can’t see anything related to timing in the code you provided. Also, knowing in what conditions does that function gets triggered would be helpful. Could you also provide screenshots related to these matters as well?
This is the function that checks whether or not the interacted object (when the player clicked in the hitbox of an object) implements the hold function: