I have a small well behaved male dog. He is 11 yrs old and has known this female for several years. He is well trained, but is now peeing (3) times on same friend when she is in apartment.
This is a dominance thing. I suggest you don't have them in the apartment together. Maybe let them play in the yard instead.