If want to use a fix ip on Raspbian following can be added to /etc/dhcpcd.conf.
With this, the static ip will only be set if no address is provided by dhcp.
profile static_eth0 static ip_address=192.168.1.23/24 static routers=192.168.1.1 static domain_name_servers=192.168.1.1 # fallback to static profile on eth0 interface eth0 fallback static_eth0