Permesso di soggiorno renewal not living constantly in Italy

Good time of the day, my name is Artemiy. For 2 years I've almost constantly been living in Milan studying in university for Master degree. However, now I have my plans for life changed, however still want to pass exams in my university. My permesso di soggiorno expires in August 2019.
So the question is.  Can I live in my country of origin and come to Italy only for exam session? Specifically I want to know whether next year i can renew my permesso di soggiorno without problems.
Thank you very much in advance for your answers! Have a good day.

Welcome to the forum

The PdS is issued for you to study in Italy, which means being in Italy.  If you are not studying in Italy then you may have problems when entering for exams and more so when you apply for renewal.
Not a good idea.