D3D10/11 is the sweet spot IMHO. It splits render pipeline state into a small number of immutable state group objects instead of granular render state toggles (like OpenGL or that new Vulkan extension), or an all-in-one rigid pipeline state object (like WebGPU or Vulkan).
Those D3D11 state objects are roughly: rasterizer-state, blend-state, depth-stencil-state, (vertex-)input-layout, and one shader object per shader stage.
Maybe the solution is a lower level API (current) and a higher level API (somewhat stateful/named but not so global). That does add extra weight though.