It might be a good idea to leave out the comma and to make two separate sentences instead. Perhaps even better could be a hyphen.
By the way, could it be that you wanted to express something different? I think because you use “schön” and “schon”. These both words have almost nothing in common when it comes to their meanings. “Schon” can mean “yet” and “schön” can mean “nice” or “good”. So perhaps you wanted to say that the person mentioned can already write German at an intermediate level and you therefore want to how long they have been learning German.
Then you could say:
Du schreibst aber schon gut Deutsch. Wie lange lernst Du denn schon Deutsch?
A bit more confusing is the following sentence:
Du schreibst aber schon schönes Deutsch. Wie lange lernst Du denn schon Deutsch?
Please let me know if you want to know more about it.