Hello,
I'm afraid, I could not understand you fully.
Where did you used that custom css, please? If you used this into your custom.css file then it will apply for all the images to set the fixed height as 400px. I have checked and they are appearing as 400 px height. https://prnt.sc/2oiZdaoLs6yO
And I could not visit your first link, it gives me 404 error, I can access your second link and gave you the code accordingly.
You have all the images overlapped with text content as expected, but you can not see because some of your images has transparent background and some has colored background. Maybe the following screenshot make sense: https://prnt.sc/PpFM9qAZSLt3
However, if you want to style certain addons with different helight/width, then you can have a look into the following conversation:
https://archive.joomshaper.com/forums/how-do-i-modify-image-size-in-image-layout-addons
It may help!
Note: I think well prepared high resolution images may solve the problem. But as you can understand you can define image size(height/width) under the same selector as I have share the code with you earlier. Do you want the max-width property to define also? Then you can, yes with this same.
Best Regards