Sir I beg to differ, and the subject is covered in the newly released Part 107 re-current study material
here it is, and it also applies to part 61, the short version is you can go above 400' AGL for the purposes of avoiding an accident or loss of aircraft. You can break ANY part 107 rule to avoid a crash or loss of aircraft. Please see screen grab from FAA 107 re-current training (new rules version) below
"In an in-flight emergency requiring immediate action, the pilot in command may deviate from any rule of this part to the extent required to meet that emergency."
OH BTW another LEGAL way to be 400' AGL is if you are next to a structure, if for example ( AND THIS QUESTION IS ON EVERY PART 107 STUDY PREP I HAVE EVER SEEN !!!) "you have been hired to inspect a tower 2.5 nm NE of Souix City, how high are you allowed to fly doing the inspection" The options on the test will be MSL,or AGL,, and since obstacles are marked on the charts as AGL, and the tower is 600' (they will make you find the tower on the chart and determine the height from the chart markings) the correct answer knowing you are allowed to fly 400' higher than the structure is 1000' AGL
I suggest you read Section 107.51, drones can fly above 400 feet if they are flying within the vicinity of a structure. The working of this exception is that manned aircraft will also adjust their cruising altitude when they pass over any large structures.
(PS I am non current Part 61, with seat time as recent as 2 weeks ago with an Instructor, I am current 107 and was one of the first people to re-current online 4/6 via the new online system... I am pretty sure I know what I am talking about when I tell someone it is legal to exceed 400' to avoid loss of aircraft or other emergency.... the same rules apply to Part 61, we can do whatever is needed to save the aircraft rules be damned and I remember that quite clearly not only from Ground School but from various instructors and my FAA Examiner.)