According to the docs at https://wiki.libsdl.org/SDL_CreateWindow , the width/height params are unused if you specify fullscreen mode. Also, the width/height params of SDL_CreateWindow, and also those of SDL_GetWindowSize, use logical sizes, not physical pixels - so requesting a 2880x1800 window is actually requesting a 5760x3600 pixel window if your macbook is using 2x scaling.
I’m not sure why you got a drawable size of 1680x1050, though.
I would try creating a window with SDL_WINDOW_FULLSCREEN_DESKTOP
(this gives you a fullscreen window without changing display modes), and then I expect SDL_GL_GetDrawableSize
will return 2880x1800.