How to adjust the Regression with ANN for last part of function
I see you use are sequential model. Could be a task for an LSTM architecture.
https://machinelearningmastery.com/time-series-prediction-lstm-recurrent-neural-networks-python-keras/

Maybe you are overengineering the thing. Judging from the dataplot, a simple OLS regression splines model may also fit well. 
https://www.analyticsvidhya.com/blog/2018/03/introduction-regression-splines-python-codes/