I'm looking for advice on the best way to fill a gap (about 1/2 inch wide) between the drywall and the window frame before re-sealing it with caulk. I've read that you can use a backer rod, or fill it with joint compound, or use insulating foam (specifically designed for windows) like the one found here (https://www.homedepot.com/p/GREAT-STUFF-12-oz-Window-and-Door-Insulating-Spray-Foam-Sealant-230612/202893747).
Any advice would be greatly appreciated.