All perfect praise be to Allah, The Lord of the Worlds. I testify that there is none worthy of worship except Allah, and that Muhammad is His slave and Messenger.
Since the situation is as you mentioned, then your parents have a reason to be afraid about your wellbeing, so obey them and do not pray in the mosque at these two times, Fajr and ‘Ishaa', and it is hoped that Allah will record for you the reward of praying in the mosque. Kashshaaf Al-Qinaa’, reads:
“The reward of a person praying alone is not decreased, if he has an excuse, as Imaam Ahmad and Al-Bukhari reported that the Prophet said: “If a person is sick or traveling, it will be written for him/her the same reward as what he/she used to do when he/she was in his residence (not travelling) and in good health.” [End of quote]
The jurists have stipulated several excuses for which a person is considered to be excused from praying in the mosque, among which is fear. The Fiqh Encyclopedia reads:
“Fear: It is an excuse for abandoning the congregation, as Ibn ‘Abbaas narrated that the Prophet said: “If anyone hears the Aathaan (call to prayer) and is not prevented from joining the congregation by any (sound) excuse” he was (immediately) asked what is the (sound) excuse, to which he replied: “Fear or illness” (then he continued saying: “The prayer that he had prayed will not be accepted from him.”
Fear is of three types: Fear for one’s own self; fear for one’s wealth; fear for one’s family.
The first type is to fear that the ruler will take him (arrest him), or (fear) an enemy, a thief, a lion, a beast or a flood, or any such things that may harm him in himself....” [End of quote -Summarized]
Finally, if you pray at home, then you should be keen on praying on time in congregation at home. The reward of congregational prayer is not exclusive to the mosque; whoever prays in congregation anywhere will get the reward.
For more benefit, please refer to Fataawa 292729, 16360, and 363331.
Allah knows best.