Even the most-recomennded VPN services can’t guarantee 100% security.
However, they immensely reduce the risk of such attacks. That’s because all DNS requests go through the encrypted VPN tunnel, making these attacks almost impossible.