Press the tofu for 15–30 minutes to remove excess moisture, then cut into cubes or triangles and set aside.
Prepare the lemongrass by trimming off the dark green tops and the tip of the bulb, then finely chop the remaining pale stalks. Finely dice the shallot, mince the garlic, and finely dice the Thai chiles.
In a small jar or bowl, whisk together warm water, cane sugar, soy sauce (or tamari), MSG (if using), and cornstarch until smooth; set aside.
Heat a large skillet or wok over medium-high heat and add enough avocado oil to coat the bottom. When the oil is hot, add the tofu pieces in a single layer and sear, turning occasionally, until golden brown on all sides, about 3–5 minutes per side. Remove the tofu to the paper-towel-lined plate and sprinkle lightly with kosher salt.
Add a little more oil to the pan if needed, then sauté the diced shallot over medium heat until translucent, about 3–5 minutes.
Add the chopped lemongrass, minced garlic, and diced chiles to the pan and cook, stirring, until fragrant, about 2–3 minutes.
Return the browned tofu to the pan and pour the prepared sauce over everything. Bring to a simmer and cook, stirring occasionally, for 5–10 minutes, until the sauce thickens and coats the tofu.
Transfer the lemongrass tofu to a serving dish and squeeze fresh lime juice over it if desired. Serve over rice, noodles, or in wraps as preferred.