As others have noted, this is 100% an issue of state law. Very generally, mechanic's liens (or artisians liens, or whatever phrase your state uses for them) come in two flavors:
1) recordable liens, and
2) Possessory liens
For recordable liens, frequently there is a form that you simply record/file with a specified government agency (depends on the state or even municipality) that creates the lien. There's usually a time frame for doing so, and the lien may only be valid for a certain period of time. You don't usually need to reduce your claim to a judgment to do this, but you'll likely have to swear under the penalty of perjury that your claim meets the requirements to file a lien. In states with recordable liens, you don't usually need to retain possession of the airplane to keep your lien.
In possessory lien jurisdictions, you typically MUST keep possession of the improved/repaired property in order to have a lien. Once you give it back, you lose your lien rights.
If you're in the repair/maintenance business, it would be extremely beneficial for you to educate yourself on your state's requirements for such liens. A few hundred dollars spent now to have an attorney draft you a short memo on local lien laws as they apply to your business could, in the long term, have a major financial impact on your ability to collect.