Python 3.8 with turtle, 156 127 bytes
Thanks to Noodle9 for catching a mistake!
from turtle import* def f(n,x=0): while~-n:goto(w:=n,n:=[n//2,3*n+1][n%2]);x<1!=clear();setworldcoordinates(0,0,x:=max(x,n),x) Animation for \$a_1=27\$:


