Leave while you can.
https://www.grammar-monster.com/glossary/complex_sentence.htm
The above is an example of a complex sentence.
I understand that "while you can" is a subordinating clause but I'm not sure about the independent clause
Leave while you can . The main or matrix clause (your independent clause) is the sentence as a whole. I take "while" to be a preposition, and thus "while you can" a PP.
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.
Leave while you can.
The main or matrix clause (your independent clause) is the sentence as a whole.
I take "while" to be a preposition, and thus "while you can" a PP. But for those who take it as a subordinator (subordinating conjunction) "while you can" is a subordinate clause.