How to modify responsive images in post thumbnails

This is mostly off-topic, but your assumption that srcset is somehow related to going desktop => mobile is just false. the srcset attribute notifies the browser about alternative images and sizes and it is the browser that selects which image to use based on whatever criteria it wants. Therefor there is most likely nothing wrong with your code if it outputs the srcset attribute and you see a non optimal fit of the image because the browser decided it is the best thing to do, for example if it has already an image in its cache it might prefer not to load a new one. Since the srcset attribute is designed to leave control in the hands of the browsers, there is not much you can do about on wordpress side.