An alternative I found is to just restart the session:
function rl { # Reload powershell Write-Output "Restarting powershell..." & powershell -NoExit -Command "Set-Location -Path $(Get-Location)" exit }