There is really another question that I want to ask however to improve upon that question I need to clarify first a certain point. Is there a Pri Megadim anywhere that says it's ossur to cook on Yom Tov for the purpose of eating the food bein hashmoshos. I suppose the reason to say it's not permitted is because maybe bein hashmoshos is already night and it'll come out that the person cooked on yom tov for the purpose of the next day which is ossur.
Pri Megadim M"Z 503:1 says it's forbidden to prepare during Bein Hashmoshos of the first day of Yom Tov for the second day (as perhaps it's still the first day). Biur Halacha there "Beyom Tov" applies this to the case of preparing before Bein Hashmoshos for during Bein Hashmoshos.