Melt butter in a large pot or Dutch oven over medium heat.
Add onion, bacon, thyme, 1 ½ teaspoon salt, and one teaspoon pepper; cook, often stirring, until onions are softened, and edges begin to brown, about 8 minutes.
Add flour and cook, constantly stirring, for 2 minutes. Gradually add water while whisking constantly, and bring to a boil.
Add corn and potatoes and return to simmer; reduce heat to medium-low and cook until potatoes are tender, 15-18 minutes.
Ladle 3 cups chowder into the blender and blend until smooth, 1-2 minutes.
Pour pureed chowder back into the pot, add half-and-half, and heat until simmer.
Take chowder off heat, add sugar, and season with salt and pepper to taste. Garnish with basil and serve.