Combine flour, 2 cups room-temperature water, and sourdough discard in the bowl of a stand mixer fitted with the dough hook. Mix on low speed, scraping down sides and hook as needed to incorporate any dry flour, until a shaggy dough forms.
Remove dough hook and cover bowl with plastic. Let sit while you prepare the yeast (you can leave the dough in this state up to 2 hours).
Stir yeast, sugar, and ½ cup warm water with a fork in a small bowl to dissolve. Let sit until yeast is foamy, about 5 minutes.
Pour yeast mixture into stand mixer bowl and mix on low speed until dough absorbs all additional water, about 1 minute (mixing on low speed will prevent liquid from splashing over the sides). Add sea salt and continue to mix, increasing speed to medium, until dough is extremely elastic and very sticky (it will look more like a thick batter and will start to slap sides of bowl), about 5 minutes.
Pour 3 Tbsp. oil into a large bowl and swirl to coat sides. Scrape in dough with a large spatula or flexible bench scraper. Cover and place in a warm spot until dough is doubled in volume, 2–3 hours.
Drizzle 2 Tbsp. oil over a baking sheet and use a pastry brush or your fingertips to rub all over bottom and sides. Using a large spatula or flexible bench scraper, fold dough inside bowl a couple of times to deflate, then scrape onto prepared baking sheet. Using oiled hands, lift up dough and fold over onto itself in half, then rotate baking sheet 90° and fold in half again. Cover dough with a piece of well-oiled plastic and let rest 10 minutes to let gluten relax.
Uncover and go back in with oiled hands, gently stretching dough (to avoid tearing) across length and width of baking sheet in an even layer, working all the way to edges and into corners. If dough starts to spring back, let sit 5–10 minutes and start again. Cover again with same piece of oiled plastic and chill at least 8 hours and up to 24.
Let sheet pan sit in a warm spot until dough is puffed and bubbly and nearly doubled in height, 45–65 minutes. Meanwhile, place a rack in center of oven; preheat to 450°.
Remove plastic and drizzle dough generously with more oil. Oil hands again and press fingertips firmly into dough, pushing down all the way to bottom of pan to dimple all over. Sprinkle with rosemary and flaky sea salt.
Bake focaccia until surface is deep golden brown all over, 25–35 minutes. Let cool in pan 10 minutes. Slide a thin metal spatula underneath focaccia to loosen from sheet pan (it may stick in a couple of places, so really use those muscles) and transfer to a wire rack. Let cool completely before cutting as desired.
Tightly wrap in plastic and store at room temperature.