This "answer" is in two parts. The first part is my assessment of your question, the second part is a suggestion intended to help you move toward a clearer understanding of your network management toolset, which will hopefully allow you to formulate a clearer question.
N.B. Networking questions can be difficult questions to formulate.
To put it bluntly, your question strikes me as ambiguous and unclear. You speak of "connected" and "disconnected", then you say you put the interface
down (disabled) yet require it to be "active" (whatever that is) for "certain other activities". Think for a moment about what exactly each of those terms mean. I'm sure you'll appreciate that network questions are difficult - for several reasons - when they are clearly stated, but may be near impossible otherwise.
A good and clear network question can be difficult to compose. Stack Exchange recognizes this difficulty; this is why an upvote for a question and and upvote for an answer have the same point rewards. Also, a good and clear question is much more likely to net you a good and clear answer. These are the incentives for investing a bit more time and effort in your question.
As distributed, RPi OS uses
wpa-cli as its default "WiFi manager".
wpa_cli is said to be a "complete tool" for managing a wi-fi connection set up with
man wpa_cli - or
wpa_cli -help to learn its options. As stated above, I'm unclear on what you mean when you said,
"I require the network interface to be active (for certain other activities)", but perhaps perusing the available documentation will help you revise your question such that it is less ambiguous. For example, see the parameters