That wouldn't be possible, the smoother shapes would have to be larger than the square ones unless they start making bespoke sensors, which is too expensive. If radio transparency is required, then even more expenses and a larger number of parts. Here's a quick model.
View attachment 125922
View attachment 125923
View attachment 125924
Strangely enough, I happen to have some, limited, experience with production of similar devices. I never worked with helicopter production but I do understand the structural dynamics of the body of a rotorcraft.
Here are the problems with your line of thinking:
Rotorcraft are not airplanes. Airplanes generate lift peacefully through gliding effect. Rotorcraft generate lift violently by forcing the air downward. In a rotorcraft the main source of stress is not airframe drag but vibration and torque generated by the main rotor. Everything in the helicopter shakes and twists at the same time because rotating mass/energy doesn't like mass/energy in adjacent space to remain inert. The airflows around the body in flight is largely negligible in comparison.
At speeds at which rotorcraft move drag is not an obstacle because the fuel economy of an armoured attack helicopter is already very bad. Rotorcraft have very inefficient propulsion which is intended to provide an unique capability of vertical takeoff and hover, not of efficient horizontal movement which could be significantly affected by drag.
In some ways additional drag may even be useful considering that the thing which helicopters need most is controlled flight. They are not supposed to move too easily because then horizontal movement can be risky. The whole point of a helo is that it doesn't want to move, so the pilot can move it with greater effort but also with greater precision. When you look at attack helicopters you will notice that their body is very different compared to transport helicopters. Transport helicopters are much more aerodynamic, because their purpose is to move payloads between points so fuel economy matters because it adds range or internal payload. Attack helicopters have hard limits on payload on pylons and consequently their range is less fluid than transport helos. Therefore attack helicopters need to be as resilient as possible, which often means that structurally simpler elements which have greater structural strength are preferable. Hence the angular look of most modern attack helos.
All the sleek aerodynamic shapes are very bad for handling dynamic stress due to being shot at. Look at how MRAP hulls are designed compared to regular vehicles. Geometry defines how forces propagate in a piece of material. More simpler geometries is more resilient to destructive forces than fewer more complex geometries.
Since we're talking about benefits of simple geometry. In your images you also misrepresented the actual geometry of the sensor. What you see on the picture of the helo is a large box sitting on a base which is structurally independent, which is fixed to the wing. It is designed like that to minimise transfer of forces from the body of the helo, via the wing, onto the sensor casing and onto the electro-mechanical system inside it.
The system has to be fixed to the casing somehow so it doesn't fly around while the helo moves. The more freeform the geometry of the box, the harder it is to fix to it the elements inside it. Think about where the screws would go. Then think how these screws would inevitably transfer vibrations from the helo body onto the casing and then onto the sensor inside it. Do you want a sensitive electro-optical mechanism to be resonating with the rotor?
That "inefficient" shape is in reality a very practical arrangement because it is not only cheaper to build it like that, but it also works better under stress. On the image above it seems to have very thick edges which indicates that they are the main load-bearing element that works under stress. Look at the edges of the casing again and consider that even today with all the advanced numerical technology a lot of welding is done with crude joints. That's because joints are the main stress-carrying element and to do it they need to have the right properties and structural strength which is created in the physical process of welding.
Left image - colours designate structurally independent elements. Orange areas are joints or reinforced edges.
Your design which is more streamlined would result in the casing of the sensor cracking and deforming much faster. The casing would also have to be mold cast, which may not be possible depending on what the materials are. The elements on the helo are cheap and easy to make and can be put together with screws and simple clamps. Because the geometry is so simple, it can be replaced in case the upgrade of the sensor requires slightly bigger elements.
All in all it is extremely unlikely for you to be more insightful and knowledgeable about the design than people who have worked on it. It is extremely likely that you are just an online enthusiast making an ill-informed commentary about things that you don't like visually but which you don't understand. The element that you criticise isn't supposed to win beauty contests. It is supposed to protect the helo against attack. Your entire mode of thinking and priorities are backwards compared to those of the helo's designers.
Hope this helped.