I realised that what I was calling border was in fact the title bar... If I use xwininfo -stats
I indeed get the border width (0 in my case). The title bar height (after maximizing the window) is obtained in the field Absolute upper-left. The following gives me the expected height :
eval $(xwininfo -id $(xdotool getactivewindow) | sed -n -e "s/^ Height: \+\([0-9]\+\).*/Height=\1/p" -e "s/^ Absolute upper-left Y: \+\([0-9]\+\).*/HeightTitleBar=\1/p")
Height=$(($Height+$HeightTitleBar))
Thanks for your help !