I have found images of Wehrmacht soldiers and officers giving a modern-looking salute, was this used? And what is the history behind it? Why wasn't this salute removed after the Nazis came to power?
Various images of "Wehrmacht Salutes:" https://imgur.com/a/O6bCKEG
Use of the Hitler salute became one of the central issues defining relations between the state, or party, and the military under the Reich. The military leadership managed for a long time to retain its own traditional customs and independent internal chain of command and refused to adopt the Hitler salute. But when Hitler assumed the presidency, in addition to the German chancellorship, after Hindenburg’s death in 1934, the military swore an oath of loyalty to the Führer, and it was agreed that members of the military and representatives of state authority would recognize each other’s protocols for saluting.
An edict from the Reich Defense Ministry of September 19, 1933, spelled out the terms of the compromise: There will be no change in previous forms of military greeting for soldiers on duty, regardless of whether they are in uniform or in athletic clothing and independent of whether they are wearing headgear. The German greeting is used by soldiers and uniformed civil servants in the following situations, a) while singing the national anthem and the Horst Wessel Lied; and b) in nonmilitary encounters both within and outside of the Wehrmacht.
The institutional autonomy of the military, which would hold on to its own salute until 1944, quickly evaporated with this decision, as modification of the military oath of loyalty demonstrates. After the failed attempt to assassinate Hitler on July 20, 1944, which was led by Wehrmacht officers, the commanders of the three main branches of the German military—desperate to prove their loyalty—asked the Führer to personally approve their decision to introduce the Hitler greeting within the Wehrmacht itself. The change was officially instituted on July 24, 1944, completing the destruction of the military’s autonomy that had commenced a decade earlier with the new loyalty oath.
Source: The Hitler Salute: On the Meaning of a Gesture, Tilman Allert, 2009.