do you want to share the sketch you are working on? you can do so with the web editor.
In JavaScript timing is sometimes funny. You need to use callback functions (efficient but maybe less intuitive) or check if the sound is finished in the draw loop (easy). The callback option is explained here
https://p5js.org/reference/#/p5.SoundFile/addCue