I fixed the iframe embed issue and made the GIF above. When I set the width/height to 400px, I’m getting those values from the canvas size on the p5 sketch.
I should have also included posting a link to the code, but it would be great if you could that as well when posting your embeds (e.g. in a clickable link below the embed).