Set the Instant Pot to Sauté mode for 5 minutes. Add 2 tablespoons butter and stir until melted. Add the onions and half the salt. Stir to combine. Place the whole thyme sprigs on top.
Add 1/2 cup water, then seal the lid and Pressure Cook on High for 5 minutes. Perform a quick release and discard thyme stems.
Set the Instant Pot to Sauté mode for 20 minutes. Sauté, stirring occasionally, until onions are deeply caramelized and golden brown, about 15-20 minutes. Remove and set aside.
Clean out the Instant Pot. Add the remaining butter, arborio rice, beef stock, and remaining salt. Seal the lid and Pressure Cook on High for 5 minutes.
Allow a 10-minute natural release, then flip the valve to release any remaining pressure. Stir in parmesan cheese until creamy. Fold in the caramelized onions.
Serve immediately, topped with freshly grated Gruyère and more thyme leaves.