It’s a derogatory when used as a noun.
Previous poster put it in quotes to show that OP probably used it that way.
It’s not derogatory when used as a noun, it’s derogatory when used in place of woman. Female is an acceptable noun to use when talking about something that does not identify as a woman. For example, a fish. Fish don’t identify as women, so there’s nothing wrong with calling them females.