To all those who gave me some guidance to solve my problem, thank you very much, because they helped me expand my thinking, I was finally able to solve it and I want to share the solution in case it happens to someone:
I created a timer that would open and then close a form that I suspected had something to do with the blocking, every 5 seconds and when it was 40 seconds open the system would slow down and end up frozen and then it would close with memory problem logs.
I was eliminating elements of the design of the form and of the code to see which generated the problem, The surprise was that when I eliminated a panel that contained 2 animations of B4XLoadingIndicator, the crashes ended and everything was resolved. I tried it, letting it open and close about 3000 times and I didn't have any errors.