Grobe wrote:but takes more time to change because I have to group/ungroup when edit opacity of lower square pattern
You don't have to ungroup to edit attributes of group members. Use ctrl-enter or doubleclick to enter the group and select an object to edit. when done use ctrl-backspace to exit group or select an object outside the group.
You can make the group of a clone of a pattern filled object and a stroked rectangle. Then when you edit the original object's opacity the opacity of the clone will update without editing it directly. useful if the same fill is used in several rectangles with independently sized strokes.