Yes, I was using a shittier focus macro for following on vehicles before, one that didn't save my previous focus.
I was about to switch to yours when I saw KvdM's macro, which appeals to me more for some reason.

I don't use Jamba to maintain my macros, I have them all generated in excel with all my character info there.

Your macro is great though, I expect that logic will come in useful elsewhere too.