Hello!! You can also do something like this:
…
int circle_x = width / 2;
int circle_y = height / 2;
int radius{25};
…
if(IsKeyDown(KEY_D) and circle_x < (width - radius)){
circle_x += 10;
}
if(IsKeyDown(KEY_A) && circle_x > (0 + radius)){
circle_x -= 10;
}
…
This way the entire circle will remain into the window and it should work if you resize the window!!