Did you set the Auto ISO limit at 4000? I didn't see anyone ask this question.
Someone did ask, but I don't think that's the issue - the min/max for the ISO range is set in whole-stop increments, ISO 3200 or 6400, but 'tweener' stops can't be set.
on 5D3 the auto iso can be in between "full stop" iso
such as iso 3200-4000-5000-6400 etc
Of course it can (in fact, with Auto ISO there's no way to not
have it use the tweener ISOs, even if you want that). But my point is that the maximum ISO limit
cannot be set to an in between value, only to full stop increments. The issue that the OP mentioned was the camera selecting ISO 4000 as the exposure got darker and darker, and since that's a tweener value, a setting that limits the ISO to a max 4000 isn't a viable explanation, since it's not possible to set such a limit, only ISO 3200 or 6400 could be set.