The problem is:
the_post_thumbnail()
outputs its content immediately. It’s basically like echo
ing instead of return
ing.
To fix it, you should be able to just replace
the_post_thumbnail('thumbnail', ['class' => 'droplet-img', 'title' => get_the_title()])
with
get_the_post_thumbnail('thumbnail', ['class' => 'droplet-img', 'title' => get_the_title()])