How to use picamera2 to capture high-resolution image with fixed exposure time

This script will capture a single camera frame from a Raspberry Pi HQ camera with its maximum resolution of 4056x3040px and a fixed exposure time of 10.0ms (which appears to be the minimum exposure time the IMX477 sensor is capable of) and a fixed analog gain of 1.0. The resulting image is saved to Exposure10ms.png

#!/usr/bin/env python3
import time
import picamera2
import numpy as np

with picamera2.Picamera2() as camera:
    camera_config = camera.create_still_configuration({"size":(4056, 3040)})
    camera.set_controls({"ExposureTime": 10000, "AnalogueGain": 1.0})

It appears to be important to use camera.set_control() after camera.configure().