If dy/dx is not a fraction, then why am I allowed to multiply both sides of an equation by dx?

If you want to think of it as a fraction, you can… The pedantry which insists it isn’t is the misguided pedantry of “No, you can’t formalize it that way. You have to formalize it this way. (Even though both ways can be interpreted coherently, and lead ultimately to the same results…)”.