Custom recent-posts shortcode’s thumbnail image not in line with rest of code

The problem is:

the_post_thumbnail() outputs its content immediately. It’s basically like echoing instead of returning.

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()])