Johann Friedrich, Brandenburg-Ansbach, Markgraf