It sounds like you e never had to take corporate sexual harassment training. That remark was clearly out of bounds according to today’s ultra-sensitivity.
The last place I worked before retiring did not go to that extreme. However the females were very aggressive with sexually oriented speech too vulgar to say and came right out and not only asked for sex but such that is really not the standard missionary thing.
This was an ultra left place. I was a hiring official there and was actually given instructions on how to avoid hiring veterans.
So to sort of answer your question, I knew better without such training. My comment earlier on this thread is dated, as back in my day telling a lady she’s pretty was in deed very complimentary, work place or not. And I still believe normal women like it.