The issue came back(but slightly different),now whenever windows troubleshooter fixes it it always complains about the gateway not being available which it can temporarely fix.
And not only that, but now not everything loses connection at the same time.
And sometimes the yellow triangle appears on the internet icon, then it appears to have lost ipv6 connection but not ipv4 and then it regains ipv6 connection a couple of seconds later and it's fine again.
And i also noticed that my computer keeps on sending data out whenever it loses internet connection but it won't receive data anymore
And all the things that you guys have suggested until now didn't work sadly enough.