What's the name of this DFS variation
This tree traversal sounds similar to a Best-first traversal where the heuristic function is based on your weight function w. This strategy uses a priority queue (e.g. a heap, in this case a max heap).
Consider the following algorithm. $G=(V,E)$ is a graph with vertex set $V$ and edge set $E$, $w(j,t)$ is the weight function taking a vertex $j \in V$ and a timestep $t$, and $S \subseteq V$ is the list of start vertices (one in each connected component of $G$). $G$ is not necessarily connected.
BestFirstTraversal(G=(V,E), w(j,t), S)
    visited = []
    t = 0
    
    # from [0, t):   heap is the order in which the vertices are visited
    # from [t, end]: heap is a max heap
    heap = S  # from t to the end is max heap
    
    # loop until all vertices have been visited
    while len(visited) != |V| do
        u = heap[t]  # get the max element
        
        # do something with u
        
        append u to visited
        append neighbors of u (not in visited) to heap
        t = t+1
        
        heapify(heap[t:])  # based on w at step t
    end while
end

Let $n = |V|$ be the number of vertices.
Run Time: BestFirstTraversal runs in $O(n^2)$.
Notice $S$ is a list of vertices, one for each connected component of $G$. This is necessary because there must be a starting point for each connected component. If we started from a single node in a graph with more than one connected component, we would never be able to visit the other connected components. Thus the loop will visit each node in $G$ from one of the starting vertices.
Thus the while loop runs $n$ times. Appending neighbors and heapify takes up to $O(n)$ work. Hence, $n * (2 * O(n)) = O(n^2)$.
Note, heap will contain the order of the vertices visited at the end BestFirstTraversal.
Hope that helps!