It is perfectly grammatical, and is used regularly, but it is not in the most natural word order. is a conjunct that heads an adverbial clause, and adverbials appear to the left of the verb phrase in Japanese. The most natural order is
> {}(){}{}
The one you have splits this into two sentences, and the latter involves inversion.