SSSP using BFS: possible code correction

I think one condition has not been handled in the code of this video:
if we reach to 3 via: 0->1->2->3 route first, then node 3 will have distance as 3. When we reach again using 0->3, the distance value for node 3 will not be updated because its not INT_MAX. I think we should add code to update the distance value of the node with minimum of the two distance values when node is reached from two separate paths. If this is correct, can you please send me the corrected code?

we are doing SSSP with BFS approach not with dfs
in bfs we first go to the nearest neighbour of node
so if 3 is directly connected to 0 then we will go via 0->3
not via 0->1->2->3

your point is correct in case of DFS approach

i hope you got my point