Just like macros, there is no set in stone optimal protein range for everyone. It will take self-experimentation to find what works best for you based on your goals.
For a beginner, starting at 25% of total calories or 0.8-1.2g per kg of lean body mass is a great starting point for most people. From here, you can adjust your protein intake based on how you are feeling.
Do not be afraid to increase your protein intake. The body can produce glucose from excess amino acids from protein, a process known as gluconeogenesis; however, the body will only activate this process to the degree needed to meet the demands of the body. It has not been supported in the literature that consuming a higher protein diet will impair your state of ketosis. In fact, it may actually lead to better results for some.