As this is my first upload to itch.io, I couldn't find how to make the HTML version playable on the site itself, in the limited time I had. Yes, I had kept the raycast2D longer than the actual spotlight sprite. My bad. Thank you for your overall comments.