Edit 1: The issue seems to be with the border-collapse property of CSS so it can be fixed by using border-spacing: 0px. But then why is border-collapse causing it? it has something to do with scaling as in if you are zoomed in or out of the window it causes the weird bold lines but in my case, I have the browser set to default zoom as well as the system (windows 11) is also at recommended 125% ( which I always used) scaling. I don't understand what is wrong

Recently I am getting a weird horizontal line after some rows when I try to create an HTML table. I have attached the screenshot. The code is a simple HTML table and simple CSS to add borders nothing fancy. I will attach the code here.

table.html
<table>
<tr>
<th>ID</th>
<th>Name</th>
<th>Phone</th>
<th>Email</th>
</tr>
<?php while($user= mysqli_fetch_array($query)){ ?>
<tr>
<td><?php echo $user['id']; ?></td>
<td><?php echo $user['name']; ?></td>
<td><?php echo $user['phone']; ?></td>
<td><?php echo $user['email']; ?></td>
</tr>
<?php } ?>
</table>
style.css
table, th, td {
border: 1px solid black;
border-collapse: collapse;
}