@YoSoyYossarian Magandang araw po sa inyo! I hope you're safe in the middle of everything.
Firstly, could you clarify what you mean by "diy-" as a prefix? Since I don't believe there is such a "prefix."
Secondly, unfortunately this is a matter of orthography, and Tagalog orthography itself has been subject to numerous changes over the last few years. I believe that the current standards are laid out in the "Manwal sa Masinop na Pagsulat" ("Manual to Neat Writing") by the Komisyon sa Wikang Filipino (Commission on the Filipino Language or KWF). Unfortunately, while the book is free to download on their website, it's written entirely in Tagalog or "Filipino," and I know of no English translations, so if ever you may have to consult with someone else to translate it for you.
For the meantime, it will really just be memorization, but thankfully, in informal Tagalog (and sometimes even in formal Tagalog style guides), words that use the "diy" diphthong can be spelled as "dy" as an accepted variation, so I suggest spelling it as "dy" if you're not certain of the standard spelling, since it's accepted anyways.
If you have any questions, please feel free to ask!