If you click the fullscreen button on itch, the display size changes. So every step, I check if the display size changed, and if it did, I change the window size accordingly:
GML:
// check if display is larger than the window
if display_get_width()!=window_get_width() {
// resize window to display
window_set_size(display_get_width(),display_get_height());
}
This is a minimal example, it will scale your game to fullscreen without taking the aspect ratio of the display into account.